diff options
-rw-r--r-- | README.md | 30 |
1 files changed, 29 insertions, 1 deletions
@@ -4,7 +4,7 @@ This is designed to sit behind nginx reverse proxy so running at 127.0.0.1:8080 | |||
4 | 4 | ||
5 | It's currently live over at https://gradecoin.xyz. | 5 | It's currently live over at https://gradecoin.xyz. |
6 | 6 | ||
7 | ``` | 7 | ```sh |
8 | # Test the project | 8 | # Test the project |
9 | $ cargo test | 9 | $ cargo test |
10 | 10 | ||
@@ -14,6 +14,34 @@ $ cargo doc --open | |||
14 | 14 | ||
15 | The executable `main` needs the `/templates`, `users` and `blocks` folders. It also expects a `secrets/gradecoin.pem` file with the private key of the system. | 15 | The executable `main` needs the `/templates`, `users` and `blocks` folders. It also expects a `secrets/gradecoin.pem` file with the private key of the system. |
16 | 16 | ||
17 | |||
18 | # Running Locally | ||
19 | |||
20 | Create RSA keys: | ||
21 | ```sh | ||
22 | $ mkdir secrets | ||
23 | $ cd secrets | ||
24 | $ openssl genrsa -out gradecoin.pem 2048 | ||
25 | $ openssl rsa -in gradecoin.pem -outform PEM -pubout -out gradecoin.pub | ||
26 | ``` | ||
27 | Use `gradecoin.pub` file in your client program. | ||
28 | |||
29 | Create students list: `students.csv` should be in the following form: | ||
30 | ```sh | ||
31 | User ID, Password | ||
32 | e123456,register_password | ||
33 | e123456,register_password | ||
34 | ``` | ||
35 | First line is ignored. | ||
36 | |||
37 | Run the server: | ||
38 | ```sh | ||
39 | $ cargo run | ||
40 | ``` | ||
41 | |||
42 | The server should be up on `localhost:8080`. | ||
43 | |||
44 | |||
17 | # References | 45 | # References |
18 | - https://github.com/blurbyte/restful-rust | 46 | - https://github.com/blurbyte/restful-rust |
19 | - https://github.com/zupzup/warp-postgres-example | 47 | - https://github.com/zupzup/warp-postgres-example |