Skeleton for basic homepage and other generic pages like 404's and things
This commit is contained in:
1 parent
f6d2fcd3f6
commit
d709e5fcc5
2 files changed
+8
No files matched your search
@@ -0,0 +1,6 @@
|
||||
use rocket_dyn_templates::{context, Template};
|
||||
|
||||
#[get("/")]
|
||||
pub fn homepage() -> Template {
|
||||
Template::render("index", context!{ })
|
||||
}
|
||||
@@ -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])
|
||||
|
||||
Reference in new issue
Block a user