diff options
-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 |