clippable/api/src/main.rs
shockrah b9c4cb7c6b * /api/categories/<cat> is now working properly
Output should be correct for the frontend
2021-10-11 20:39:51 -07:00

24 lines
574 B
Rust

#![feature(decl_macro)]
#[macro_use] extern crate rocket;
use std::env;
use rocket_dyn_templates::Template;
mod page;
mod category;
mod video;
#[tokio::main]
async fn main() {
// emoji's crash my terminal
env::set_var("ROCKET_CLI_COLORS", "false");
/*
* Some of the target vars that we look for
* CLIP_DIR
*/
let _ = rocket::build()
.mount("/", routes![page::home, page::category, page::video, page::files])
.mount("/api", routes![category::list, video::list])
.attach(Template::fairing())
.launch().await;
}