aboutsummaryrefslogtreecommitdiffstats
path: root/src/bin/main.rs
blob: f1fa90872f61e854eaeedad84326935f0d03e74d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
use gradecoin::routes::consensus_routes;
use gradecoin::schema::create_database;

#[tokio::main]
async fn main() {
    log4rs::init_file("log.conf.yml", Default::default()).unwrap();

    let db = create_database();

    let api = consensus_routes(db);

    // Start the server
    let point = ([127, 0, 0, 1], 8080);
    warp::serve(api).run(point).await;
}