Skip to content

Instantly share code, notes, and snippets.

@sean3z
Created April 13, 2017 18:57
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save sean3z/6abde0ef5d5e2fce11b488bdaece0385 to your computer and use it in GitHub Desktop.
Save sean3z/6abde0ef5d5e2fce11b488bdaece0385 to your computer and use it in GitHub Desktop.
Example Rocket Server
#![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