summaryrefslogtreecommitdiff
path: root/src/main.rs
diff options
context:
space:
mode:
authorJoe Carstairs <me@joeac.net>2026-05-15 14:16:27 +0100
committerJoe Carstairs <me@joeac.net>2026-05-15 14:16:27 +0100
commite433feddbe418b57e829ff86fba374a5d57990f2 (patch)
tree6a639f8d2db071da2f73d46609366a6aad2423d5 /src/main.rs
parent8585cac60657018e7e1810c18f472e254621b23d (diff)
installs rocket, hello world endpoint
Diffstat (limited to 'src/main.rs')
-rw-r--r--src/main.rs12
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!"
}