**What it demonstrates**: Two Go nodes are created and run a chat server using a shared PubSub topic. **TODO**: Should be a Go node and a JS node, once I get the two Go nodes version working.
The bootstrapper creates a new libp2p node, subscribes to the shared topic string, spawns a go routine to emit any publishes to that topic, and then waits forever.
**Second terminal**: Create a go peer to connect to bootstrapper and publish on the topic
```
cd pubsub
./pubsub-interop ../util/private_key.bin.peer.Sk
```
This peer, which is not in bootstrapper mode, creates a node, subscribes to the shared topic string, spawns the same go routine, and then loops forever requesting user input and publishing each line to the topic.
#TODO
**Third terminal**: Create a JS peer to connect to bootstrap and publish on topic
```
cd pubsub/js
```
_Acknowledgements: @jhiesey for DHT (content & peer routing) JS+Go interop, @stebalien for PubSub_
usage:=fmt.Sprintf("Usage: %s [-b] [PRIVATE_KEY]\n\n-b is bootstrap mode (creates DHT)\nPRIVATE_KEY is the path to a private key like '../util/private_key.bin'\n",os.Args[0])
@ -46,7 +49,7 @@ func main() {
}else{
fmt.Printf("peer mode")
}
fmt.Printf(" with private key '%s'",privKeyFilePath)
fmt.Printf(" with private key '%s'\n",privKeyFilePath)