Created
October 21, 2019 08:55
-
-
Save trimoq/b44e14ff5e5fc4c4ce89f493dbe2fa96 to your computer and use it in GitHub Desktop.
Tiny hello world code
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
#[macro_use] | |
extern crate rocket; | |
#[get("/hello/<name>")] | |
fn hello(name: String) -> String { | |
format!("hello {}", name) | |
} | |
fn main() { | |
rocket::ignite() | |
.mount("/", routes![hello]) | |
.launch(); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment