summaryrefslogtreecommitdiffstats
path: root/src/bin
diff options
context:
space:
mode:
Diffstat (limited to 'src/bin')
-rw-r--r--src/bin/main.rs5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/bin/main.rs b/src/bin/main.rs
index 598a2e1..8b61e5c 100644
--- a/src/bin/main.rs
+++ b/src/bin/main.rs
@@ -1,6 +1,7 @@
1use std::env; 1use std::env;
2use warp::Filter; 2use warp::Filter;
3 3
4// use gradecoin::error;
4use gradecoin::routes::consensus_routes; 5use gradecoin::routes::consensus_routes;
5use gradecoin::schema::create_database; 6use gradecoin::schema::create_database;
6 7
@@ -9,6 +10,7 @@ use gradecoin::schema::create_database;
9#[tokio::main] 10#[tokio::main]
10async fn main() { 11async fn main() {
11 // Show debug logs by default by setting `RUST_LOG=gradecoin=debug` 12 // Show debug logs by default by setting `RUST_LOG=gradecoin=debug`
13 // TODO: write logs to file? <13-04-21, yigit> //
12 if env::var_os("RUST_LOG").is_none() { 14 if env::var_os("RUST_LOG").is_none() {
13 env::set_var("RUST_LOG", "gradecoin=debug"); 15 env::set_var("RUST_LOG", "gradecoin=debug");
14 } 16 }
@@ -21,5 +23,6 @@ async fn main() {
21 let routes = api.with(warp::log("gradecoin")); 23 let routes = api.with(warp::log("gradecoin"));
22 24
23 // Start the server 25 // Start the server
24 warp::serve(routes).run(([127, 0, 0, 1], 8080)).await; 26 let point = ([127, 0, 0, 1], 8080);
27 warp::serve(routes).run(point).await;
25} 28}