summaryrefslogtreecommitdiffstats
path: root/src/main.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/main.rs')
-rw-r--r--src/main.rs26
1 files changed, 0 insertions, 26 deletions
diff --git a/src/main.rs b/src/main.rs
deleted file mode 100644
index 5683aea..0000000
--- a/src/main.rs
+++ /dev/null
@@ -1,26 +0,0 @@
1use gradecoin::schema::create_database;
2use std::env;
3use warp::Filter;
4
5mod custom_filters;
6mod handlers;
7mod routes;
8// mod validators;
9
10#[tokio::main]
11async fn main() {
12 // Show debug logs by default by setting `RUST_LOG=restful_rust=debug`
13 if env::var_os("RUST_LOG").is_none() {
14 env::set_var("RUST_LOG", "gradecoin=debug");
15 }
16 pretty_env_logger::init();
17
18 let db = create_database();
19
20 let api = routes::consensus_routes(db);
21
22 let routes = api.with(warp::log("gradecoin"));
23
24 // Start the server
25 warp::serve(routes).run(([127, 0, 0, 1], 8080)).await;
26}