feat: add rocket rs

This commit is contained in:
2021-04-07 00:40:03 +08:00
parent 521fc4f369
commit 8b2c84b8bc
3 changed files with 801 additions and 0 deletions

View File

@@ -0,0 +1,13 @@
#![feature(proc_macro_hygiene, decl_macro)]
#[macro_use] extern crate rocket;
#[get("/hello/<name>/<age>")]
fn hello(name: String, age: u8) -> String {
format!("Hello, {} year old named {}!", age, name)
}
fn main() {
rocket::ignite().mount("/", routes![hello]).launch();
}