1
0
This commit is contained in:
Anson Biggs 2023-11-27 19:52:03 -07:00
parent 90d5e96c21
commit 8754cf5bc1

View File

@ -1,13 +1,21 @@
use rocket::{get, routes}; use rocket::{get, routes};
use rocket::http::Status;
#[get("/")] #[get("/")]
fn index() -> &'static str { fn index() -> &'static str {
"Hello, world!" "Hello, world!"
} }
#[get("/-1/error")]
fn error() -> Status{
Status::InternalServerError
}
#[shuttle_runtime::main] #[shuttle_runtime::main]
async fn main() -> shuttle_rocket::ShuttleRocket { async fn main() -> shuttle_rocket::ShuttleRocket {
let rocket = rocket::build().mount("/", routes![index]); let rocket = rocket::build().mount("/", routes![index, error]);
Ok(rocket.into()) Ok(rocket.into())
} }