This example uses the two files in the examples/basic directory.
First run the announce.js file in the terminal to announce a service:
node examples/basic/announce.js
Then run the lookup.js file in another terminal tab or window:
node examples/basic/lookup.js
This example uses the two files in the examples/net directory.
Run the announce.js file in the terminal to announce the server:
node examples/net/announce.js
Then run the lookup.js file in another terminal tab or window:
node examples/net/lookup.js
This example uses the two files in the examples/hypercore directory.
Run the announce.js file in the terminal to announce the server:
node examples/hypercore/announce.js
Then run the lookup.js file in another terminal tab or window:
You can copy this command with the key from the output of running the announce.js file.
node examples/hypercore/lookup.js <key>