diff options
author | necrashter | 2022-04-23 17:09:46 +0300 |
---|---|---|
committer | Yigit Sever | 2022-04-23 18:10:12 +0300 |
commit | f53292861c382484ce13d7af98e288bda97c55d0 (patch) | |
tree | 7a6ef07ef6f475c7ed0334c7e805a48446d34a5f /README.md | |
parent | d53a714d603607b98febe129d10226a7319b7769 (diff) | |
download | gradecoin-f53292861c382484ce13d7af98e288bda97c55d0.tar.gz gradecoin-f53292861c382484ce13d7af98e288bda97c55d0.tar.bz2 gradecoin-f53292861c382484ce13d7af98e288bda97c55d0.zip |
Update README with config and database info
Diffstat (limited to 'README.md')
-rw-r--r-- | README.md | 22 |
1 files changed, 21 insertions, 1 deletions
@@ -27,7 +27,7 @@ $ openssl rsa -in gradecoin.pem -outform PEM -pubout -out gradecoin.pub | |||
27 | Use `gradecoin.pub` file in your client program. | 27 | Use `gradecoin.pub` file in your client program. |
28 | 28 | ||
29 | Create students list: `students.csv` should be in the following form: | 29 | Create students list: `students.csv` should be in the following form: |
30 | ```sh | 30 | ``` |
31 | User ID, Password | 31 | User ID, Password |
32 | e123456,register_password | 32 | e123456,register_password |
33 | e123456,register_password | 33 | e123456,register_password |
@@ -41,6 +41,26 @@ $ cargo run | |||
41 | 41 | ||
42 | The server should be up on `localhost:8080`. | 42 | The server should be up on `localhost:8080`. |
43 | 43 | ||
44 | The default config file is `config.yaml`. | ||
45 | You can specify another config file with: | ||
46 | ```sh | ||
47 | $ cargo run another_config.yaml | ||
48 | ``` | ||
49 | |||
50 | You can even run multiple networks at once by giving multiple configuration files: | ||
51 | ```sh | ||
52 | # Run both the main network (at /) and testnet (at /testnet) | ||
53 | # For example, register for main network at `localhost:8080/register`, | ||
54 | # testnet network at `localhost:8080/testnet/register` | ||
55 | $ cargo run config.yaml testnet.yaml | ||
56 | ``` | ||
57 | In the config file, `url_prefix` field determines the address of the network. | ||
58 | |||
59 | You can clear the database for all networks by running: | ||
60 | ```sh | ||
61 | $ rm -rf blocks users | ||
62 | ``` | ||
63 | Or you can delete the database for a particular network by removing `blocks/network_name` and `users/network_name`. | ||
44 | 64 | ||
45 | # References | 65 | # References |
46 | - https://github.com/blurbyte/restful-rust | 66 | - https://github.com/blurbyte/restful-rust |