meowy-webring/src/main.rs

36 lines
636 B
Rust

use crate::watcher::hot_reloading;
use meowy_assets::files::initialize_files;
use rocket::tokio;
use sites::init_names;
#[macro_use]
extern crate rocket;
mod links;
mod responders;
mod routes;
mod sites;
mod watcher;
#[launch]
async fn rocket() -> _ {
init_names().unwrap();
initialize_files();
tokio::task::spawn_blocking(hot_reloading);
rocket::build()
.mount(
"/",
routes![routes::index, routes::previous, routes::next, routes::name],
)
.register("/", catchers![routes::not_found])
.mount(
"/public",
routes![
meowy_assets::style,
meowy_assets::woff2_font,
meowy_assets::woff_font
],
)
}