mirror of https://github.com/rwf2/Rocket.git
A better README.
This commit is contained in:
parent
293159904f
commit
ba6caad7c8
|
@ -11,9 +11,9 @@ does, the following will be the canonical "Hello, world!" example:
|
||||||
extern crate rocket;
|
extern crate rocket;
|
||||||
use rocket::Rocket;
|
use rocket::Rocket;
|
||||||
|
|
||||||
#[route(GET, path = "/hello/<name>")]
|
#[route(GET, path = "/hello/<name>/<age>")]
|
||||||
fn hello(name: &'static str) -> String {
|
fn hello(name: &str, age: i8) -> String {
|
||||||
format!("Hello, {}!", name)
|
format!("Hello, {} year old named {}!", age, name)
|
||||||
}
|
}
|
||||||
|
|
||||||
fn main() {
|
fn main() {
|
||||||
|
|
Loading…
Reference in New Issue