aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authornecrashter2022-04-23 13:17:41 +0300
committerYigit Sever2022-04-23 18:10:12 +0300
commit052d0a0fd2c6cf6b5cdc965a812ad22238d402e8 (patch)
treee54984b29abf249b2669cacad1b3b658cffc9230
parent7fadbabf9f6632ecc5e097058859c2eae48efc08 (diff)
downloadgradecoin-052d0a0fd2c6cf6b5cdc965a812ad22238d402e8.tar.gz
gradecoin-052d0a0fd2c6cf6b5cdc965a812ad22238d402e8.tar.bz2
gradecoin-052d0a0fd2c6cf6b5cdc965a812ad22238d402e8.zip
Add instructions for running server locally
-rw-r--r--README.md30
1 files changed, 29 insertions, 1 deletions
diff --git a/README.md b/README.md
index 31028ac..71b962d 100644
--- a/README.md
+++ b/README.md
@@ -4,7 +4,7 @@ This is designed to sit behind nginx reverse proxy so running at 127.0.0.1:8080
4 4
5It's currently live over at https://gradecoin.xyz. 5It'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
15The executable `main` needs the `/templates`, `users` and `blocks` folders. It also expects a `secrets/gradecoin.pem` file with the private key of the system. 15The 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
20Create 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```
27Use `gradecoin.pub` file in your client program.
28
29Create students list: `students.csv` should be in the following form:
30```sh
31User ID, Password
32e123456,register_password
33e123456,register_password
34```
35First line is ignored.
36
37Run the server:
38```sh
39$ cargo run
40```
41
42The 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