An example for building a simple peer to peer application using Rust
Run with RUST_LOG=info cargo run
in multiple terminals, preferably in different folders, each containing a different, or empty recipes.json
file.
Upon starting, press enter to start the application. The application expects a recipes.json
file in the folder where it's executed.
There are several commands:
ls p
- list all peersls r
- list local recipesls r all
- list all public recipes from all known peersls r {peerId}
- list all public recipes from the given peercreate r Name|Ingredients|Instructions
- create a new recipe with the given data, the|
are important as separatorspublish r {recipeId}
- publish recipe with the given recipe ID