Initial commit

This commit is contained in:
2023-11-26 16:36:39 +01:00
commit d5a30b5951
10 changed files with 2642 additions and 0 deletions

13
src/lib.rs Normal file
View File

@@ -0,0 +1,13 @@
use rocket::*;
use rocket_dyn_templates::Template;
pub mod routes;
pub fn rocket_builder() -> Rocket<Build> {
rocket::build().attach(
Template::fairing()
).mount("/", routes![
routes::root::index
])
}

8
src/main.rs Normal file
View File

@@ -0,0 +1,8 @@
use ovlach_frontend::rocket_builder;
use rocket::launch;
#[launch]
fn rocket() -> _ {
rocket_builder()
}

1
src/routes/mod.rs Normal file
View File

@@ -0,0 +1 @@
pub mod root;

14
src/routes/root.rs Normal file
View File

@@ -0,0 +1,14 @@
use rocket::get;
use rocket_dyn_templates::Template;
use serde::Serialize;
#[derive(Serialize, Debug)]
struct Test {
}
#[get("/")]
pub fn index() -> Template {
let context = Test {};
Template::render("default", &context)
}