blob: c9afc469f8a5c8633f45b2a8161678f4906ff711 (
plain) (
blame)
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
|
#![feature(proc_macro_hygiene, decl_macro, option_result_contains)]
#[macro_use] extern crate rocket;
#[macro_use] extern crate serde_derive;
extern crate rocket_contrib;
extern crate serde_json;
mod api;
mod ui;
mod db;
mod structures;
use rocket_contrib::templates::Template;
fn main() {
rocket::ignite()
.attach(Template::fairing())
.register(catchers![
ui::not_found
])
.mount("/", routes![
ui::index,
ui::boards,
ui::board
])
.mount("/api/v1/", routes![
api::post
])
.launch();
}
|