aboutsummaryrefslogtreecommitdiff
path: root/server/src/routes/mod.rs
blob: 4491e813e866a80009ae2b96d138316a22c3b2fa (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
use crate::AppState;
use rocket::{catchers, routes, Build, Rocket};
use stream::r_stream;
use ui::error::r_not_found;
use ui::home::r_home;
use ui::node::r_library_node;
use ui::style::{r_assets_font, r_assets_style};

pub mod stream;
pub mod ui;

pub fn build_rocket(state: AppState) -> Rocket<Build> {
    rocket::build()
        .manage(state)
        .register("/", catchers![r_not_found])
        .mount(
            "/",
            routes![
                r_home,
                r_library_node,
                r_assets_style,
                r_assets_font,
                r_stream
            ],
        )
}