Skeleton for basic homepage and other generic pages like 404's and things

This commit is contained in:
shockrah 2025-08-18 10:19:10 -07:00
parent f6d2fcd3f6
commit d709e5fcc5
2 changed files with 8 additions and 0 deletions

6
service/src/generic.rs Normal file
View File

@ -0,0 +1,6 @@
use rocket_dyn_templates::{context, Template};
#[get("/")]
pub fn homepage() -> Template {
Template::render("index", context!{ })
}

View File

@ -4,6 +4,7 @@ use rocket::fs::FileServer;
mod video;
mod db;
mod generic;
const FILES_VIDEO: &'static str = "/opt/clippable/file/video";
const DB_FILE: &'static str = "/opt/clippable/db.json";
@ -14,6 +15,7 @@ const VIDEO_BASE_URI: &'static str = "/file/video";
async fn main() {
let _ = rocket::build()
.mount("/", routes![generic::homepage])
.mount("/static", FileServer::from("static"))
.mount("/c", routes![video::index])
.mount(VIDEO_BASE_URI, routes![video::file])