summaryrefslogtreecommitdiff
path: root/src/main.rs
blob: eb5af4c4cb616fd212f1237034305c13c9abdb89 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
#![feature(proc_macro_hygiene, decl_macro)]
#![feature(try_trait)]

#[macro_use]
extern crate rocket;
#[macro_use]
extern crate lazy_static;
mod database;
mod errors;
mod serve;
mod spotify;

#[rocket::main]
async fn main() {
    database::initialize_db().expect("failed to initialize_db");
    println!("connected with db");
    rocket::ignite()
        .mount(
            "/",
            routes![
                serve::token,
                serve::get_tracks,
                serve::match_users,
                serve::get_users,
                serve::create_lobby
            ],
        )
        .launch()
        .await
        .unwrap();
}