diff options
| author | Joe Carstairs <me@joeac.net> | 2026-05-15 14:16:27 +0100 |
|---|---|---|
| committer | Joe Carstairs <me@joeac.net> | 2026-05-15 14:16:27 +0100 |
| commit | e433feddbe418b57e829ff86fba374a5d57990f2 (patch) | |
| tree | 6a639f8d2db071da2f73d46609366a6aad2423d5 /src/main.rs | |
| parent | 8585cac60657018e7e1810c18f472e254621b23d (diff) | |
installs rocket, hello world endpoint
Diffstat (limited to 'src/main.rs')
| -rw-r--r-- | src/main.rs | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/src/main.rs b/src/main.rs index e7a11a9..af7b49a 100644 --- a/src/main.rs +++ b/src/main.rs @@ -1,3 +1,11 @@ -fn main() { - println!("Hello, world!"); +#[macro_use] extern crate rocket; + +#[launch] +fn rocket() -> _ { + rocket::build().mount("/", routes![index]) +} + +#[get("/")] +fn index() -> &'static str { + "Hello, world!" } |
