26 lines
410 B
Rust
26 lines
410 B
Rust
#![feature(plugin)]
|
|
#![plugin(rocket_codegen)]
|
|
|
|
extern crate rocket;
|
|
extern crate rocket_contrib;
|
|
|
|
use rocket::Rocket;
|
|
use rocket_contrib::Template;
|
|
|
|
mod static_files;
|
|
|
|
#[get("/")]
|
|
fn index() -> &'static str {
|
|
"Hello, world!"
|
|
}
|
|
|
|
fn rocket() -> Rocket {
|
|
rocket::ignite()
|
|
.mount("/", routes![index, static_files::all])
|
|
.attach(Template::fairing())
|
|
}
|
|
|
|
fn main() {
|
|
rocket().launch();
|
|
}
|