From 87b8b05caf4a01b168c02784e1dff9d28317202d Mon Sep 17 00:00:00 2001 From: Arun Manivannan Date: Wed, 3 Jan 2024 21:20:58 +0800 Subject: [PATCH] docs: Updating release run and interaction with the cluster --- README.md | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/README.md b/README.md index 367dc79..2639843 100644 --- a/README.md +++ b/README.md @@ -76,6 +76,30 @@ cargo run -- -n node2 -c config/cluster_config.yaml cargo run -- -n node3 -c config/cluster_config.yaml ``` +### Release mode + +Optionally, you could run it in release mode by running: + +```bash +cargo build --release +``` + +and then + +```bash +./target/release/rafting -n node1 -c config/cluster_config.yaml +./target/release/rafting -n node2 -c config/cluster_config.yaml +./target/release/rafting -n node3 -c config/cluster_config.yaml +``` + +### Interacting with the cluster + +```bash +curl -i -X POST -H "Content-Type: application/json" --request POST --data '{"key":"a","value":"1"}' http://:/command +curl -i -X POST -H "Content-Type: application/json" --request POST --data '{"key":"b","value":"2"}' http://:/command +curl -i -X POST -H "Content-Type: application/json" --request POST --data '{"key":"c","value":"3"}' http://:/command +``` + ## Contributing Contributions to Rafting are welcome! Whether you want to fix a bug, add a feature, or improve documentation, feel free to open an issue or submit a