diff options
Diffstat (limited to 'src/bin')
-rw-r--r-- | src/bin/main.rs | 11 |
1 files changed, 0 insertions, 11 deletions
diff --git a/src/bin/main.rs b/src/bin/main.rs index bf5f6b0..f1fa908 100644 --- a/src/bin/main.rs +++ b/src/bin/main.rs | |||
@@ -1,25 +1,14 @@ | |||
1 | use std::env; | ||
2 | |||
3 | // use gradecoin::error; | ||
4 | use gradecoin::routes::consensus_routes; | 1 | use gradecoin::routes::consensus_routes; |
5 | use gradecoin::schema::create_database; | 2 | use gradecoin::schema::create_database; |
6 | 3 | ||
7 | // mod validators; | ||
8 | |||
9 | #[tokio::main] | 4 | #[tokio::main] |
10 | async fn main() { | 5 | async fn main() { |
11 | // Show debug logs by default by setting `RUST_LOG=gradecoin=debug` | ||
12 | if env::var_os("RUST_LOG").is_none() { | ||
13 | env::set_var("RUST_LOG", "gradecoin=debug"); | ||
14 | } | ||
15 | log4rs::init_file("log.conf.yml", Default::default()).unwrap(); | 6 | log4rs::init_file("log.conf.yml", Default::default()).unwrap(); |
16 | 7 | ||
17 | let db = create_database(); | 8 | let db = create_database(); |
18 | 9 | ||
19 | let api = consensus_routes(db); | 10 | let api = consensus_routes(db); |
20 | 11 | ||
21 | // let routes = api.with(warp::log("gradecoin")); | ||
22 | |||
23 | // Start the server | 12 | // Start the server |
24 | let point = ([127, 0, 0, 1], 8080); | 13 | let point = ([127, 0, 0, 1], 8080); |
25 | warp::serve(api).run(point).await; | 14 | warp::serve(api).run(point).await; |