~/selfhut

selfhut/src/main.rs -rw-r--r-- 436 B
ef55c0da — arthurmelton summary 2 years ago
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
#[macro_use]
extern crate rocket;
mod git;
mod index;
mod repository;
mod utils;

use utils::config;

use rocket::fs::relative;
use rocket::fs::FileServer;
use rocket_dyn_templates::Template;
use crate::repository::summary;

#[launch]
fn rocket() -> _ {
    rocket::build()
        .mount("/", routes![index::index, summary::repository])
        .mount("/", FileServer::from(relative!("static")))
        .attach(Template::fairing())
}