diff options
author | Yigit Sever | 2021-05-10 21:04:26 +0300 |
---|---|---|
committer | Yigit Sever | 2021-05-10 21:04:26 +0300 |
commit | 953fcf7c0d829a7664c06a75bbd29987afe7b654 (patch) | |
tree | 606073ef6fe48c8833085b7c9560b915c7e37d5e /src/bin | |
parent | b996bf95e9523e8c62c152f4c753ea003e57115e (diff) | |
download | gradecoin-953fcf7c0d829a7664c06a75bbd29987afe7b654.tar.gz gradecoin-953fcf7c0d829a7664c06a75bbd29987afe7b654.tar.bz2 gradecoin-953fcf7c0d829a7664c06a75bbd29987afe7b654.zip |
Remove old logging residue
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; |