This repo contains source code example for running a simple node with libp2p's Go implementation called go-libp2p. The node can send and receive "ping" messages depending on how it started the execution.
-
Build module:
Unix/Linux:
go build -o <OUTPUT_BINARY_NAME>or
Windows:
go build -o <OUTPUT_BINARY_NAME>.exe -
Run listening node in one terminal:
Unix/Linux:
./OUTPUT_BINARY_NAMEor
Windows:
OUTPUT_BINARY_NAME.exe -
Ping listening node from another terminal using multiaddress as command line argument:
Unix/Linux:
./OUTPUT_BINARY_NAME multiaddressor
Windows:
OUTPUT_BINARY_NAME.exe multiaddress
Official reference guide: Run a go-libp2p node
