feat: add rocket web-framework
All checks were successful
renovate / renovate (push) Successful in 25s
All checks were successful
renovate / renovate (push) Successful in 25s
This commit is contained in:
parent
7f36bb2abd
commit
e905c4263e
@ -4,3 +4,4 @@ version = "0.1.0"
|
||||
edition = "2021"
|
||||
|
||||
[dependencies]
|
||||
rocket = "0.5.0"
|
||||
|
14
src/main.rs
14
src/main.rs
@ -1,3 +1,13 @@
|
||||
fn main() {
|
||||
println!("Hello, world!");
|
||||
#[macro_use]
|
||||
extern crate rocket;
|
||||
|
||||
#[get("/")]
|
||||
fn index() -> &'static str {
|
||||
"Hello, world!"
|
||||
}
|
||||
|
||||
#[launch]
|
||||
fn rocket() -> _ {
|
||||
rocket::build().mount("/", routes![index])
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user