Created
April 13, 2017 18:57
-
-
Save sean3z/6abde0ef5d5e2fce11b488bdaece0385 to your computer and use it in GitHub Desktop.
Example Rocket Server
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#![feature(plugin)] | |
#![plugin(rocket_codegen)] | |
extern crate rocket; | |
#[get("/")] | |
fn index() -> &'static str { | |
"Hello, world!" | |
} | |
fn main() { | |
rocket::ignite().mount("/", routes![index]).launch(); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment