Initial Rocket commit
This commit is contained in:
14
src/main.rs
Normal file
14
src/main.rs
Normal file
@@ -0,0 +1,14 @@
|
||||
#[macro_use] extern crate rocket;
|
||||
use rocket_dyn_templates::{context, Template};
|
||||
|
||||
#[get("/")]
|
||||
fn index() -> Template {
|
||||
let context = context! {};
|
||||
Template::render("index", context)
|
||||
}
|
||||
|
||||
#[launch]
|
||||
fn rocket() -> _ {
|
||||
rocket::build().mount("/", routes![index])
|
||||
.attach(Template::fairing())
|
||||
}
|
||||
Reference in New Issue
Block a user