From f53292861c382484ce13d7af98e288bda97c55d0 Mon Sep 17 00:00:00 2001 From: necrashter Date: Sat, 23 Apr 2022 17:09:46 +0300 Subject: Update README with config and database info --- README.md | 22 +++++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 71b962d..89ddc26 100644 --- a/README.md +++ b/README.md @@ -27,7 +27,7 @@ $ openssl rsa -in gradecoin.pem -outform PEM -pubout -out gradecoin.pub Use `gradecoin.pub` file in your client program. Create students list: `students.csv` should be in the following form: -```sh +``` User ID, Password e123456,register_password e123456,register_password @@ -41,6 +41,26 @@ $ cargo run The server should be up on `localhost:8080`. +The default config file is `config.yaml`. +You can specify another config file with: +```sh +$ cargo run another_config.yaml +``` + +You can even run multiple networks at once by giving multiple configuration files: +```sh +# Run both the main network (at /) and testnet (at /testnet) +# For example, register for main network at `localhost:8080/register`, +# testnet network at `localhost:8080/testnet/register` +$ cargo run config.yaml testnet.yaml +``` +In the config file, `url_prefix` field determines the address of the network. + +You can clear the database for all networks by running: +```sh +$ rm -rf blocks users +``` +Or you can delete the database for a particular network by removing `blocks/network_name` and `users/network_name`. # References - https://github.com/blurbyte/restful-rust -- cgit v1.2.3-70-g09d2