diff options
| author | Fuwn <[email protected]> | 2020-11-18 21:16:45 +0000 |
|---|---|---|
| committer | Fuwn <[email protected]> | 2020-11-18 21:16:45 +0000 |
| commit | 793e5c5f9883a83d66e87ea974546380d121d048 (patch) | |
| tree | 8fa9038d865b726d1d6b9508acd5cd3ef834b691 /src/main.rs | |
| parent | Create LICENSE.md (diff) | |
| download | chan-793e5c5f9883a83d66e87ea974546380d121d048.tar.xz chan-793e5c5f9883a83d66e87ea974546380d121d048.zip | |
repo: :star:
Diffstat (limited to 'src/main.rs')
| -rw-r--r-- | src/main.rs | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/src/main.rs b/src/main.rs new file mode 100644 index 0000000..f5fbd56 --- /dev/null +++ b/src/main.rs @@ -0,0 +1,29 @@ +#![feature(proc_macro_hygiene, decl_macro)] + +#[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; + +use rocket_contrib::templates::Template; + +fn main() { + rocket::ignite() + .attach(Template::fairing()) + .register(catchers![ + ui::not_found + ]) + .mount("/", routes![ + ui::index, + ui::make_post, + ui::threads + ]) + .mount("/api/v1/", routes![ + api::post + ]) + .launch(); +} |