mirror of
https://github.com/dolthub/dolt.git
synced 2026-02-09 10:38:10 -06:00
Update demo-p2p-chat.md
This commit is contained in:
@@ -5,3 +5,30 @@
|
||||
[](https://godoc.org/github.com/attic-labs/noms)
|
||||
[](http://slack.noms.io)
|
||||
|
||||
# Demo App: IPFS-based Decentralized Chat
|
||||
|
||||
Demo app code is in the
|
||||
[p2p](https://github.com/attic-labs/noms/tree/master/samples/go/ipfs-chat/p2p)
|
||||
directory. To get it up and running take the following steps:
|
||||
* Use git to clone the noms repository onto your computer:
|
||||
```
|
||||
git clone git@github.com:attic-labs/noms.git or git clone https://github.com/attic-labs/noms.git
|
||||
```
|
||||
* From the noms/samples/go/ipfs-chat/p2p directory, build the program with the following command:
|
||||
```
|
||||
go build
|
||||
```
|
||||
* Run the p2p client with the following command:
|
||||
```
|
||||
mkdir /tmp/noms1
|
||||
./p2p client --username=<aname1> --node-idx=2 /tmp/noms1 >& /tmp/err1
|
||||
```
|
||||
* Run a second p2p client with the following command:
|
||||
```
|
||||
./p2p client --username=<aname2> --node-idx=3 /tmp/noms2 >& /tmp/err2
|
||||
```
|
||||
|
||||
Note: the p2p client relies on IPFS for it's pub/sub implementation. The
|
||||
'node-idx' argument ensures that each IPFS-based node uses a distinct set
|
||||
of ports. This is useful when running multiple IPFS-based programs on
|
||||
the same machine.
|
||||
|
||||
Reference in New Issue
Block a user