Rocket/examples/hello_world/src/main.rs

16 lines
278 B
Rust
Raw Normal View History

#![feature(plugin, decl_macro, proc_macro_non_items)]
2016-09-09 03:38:58 +00:00
#![plugin(rocket_codegen)]
#[macro_use] extern crate rocket;
#[cfg(test)] mod tests;
#[get("/")]
2016-09-23 04:29:03 +00:00
fn hello() -> &'static str {
"Hello, world!"
}
fn main() {
rocket::ignite().mount("/", routes![hello]).launch();
}