aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/bin/main.rs11
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 @@
1use std::env;
2
3// use gradecoin::error;
4use gradecoin::routes::consensus_routes; 1use gradecoin::routes::consensus_routes;
5use gradecoin::schema::create_database; 2use gradecoin::schema::create_database;
6 3
7// mod validators;
8
9#[tokio::main] 4#[tokio::main]
10async fn main() { 5async 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;