mirror of https://github.com/rwf2/Rocket.git
15 lines
253 B
Rust
15 lines
253 B
Rust
|
#![feature(plugin)]
|
||
|
#![plugin(rocket_macros)]
|
||
|
|
||
|
extern crate rocket;
|
||
|
use rocket::Rocket;
|
||
|
|
||
|
#[route(GET, path = "/")]
|
||
|
fn root() -> &'static str {
|
||
|
"Hello, world!"
|
||
|
}
|
||
|
|
||
|
fn main() {
|
||
|
Rocket::new("localhost", 8000).mount_and_launch("/", routes![root]);
|
||
|
}
|