mirror of
https://gitlab.com/Anson-Projects/shuttle-christmas-code-hunt-2023.git
synced 2025-06-15 14:46:47 +00:00
day -1
This commit is contained in:
parent
90d5e96c21
commit
8754cf5bc1
10
src/main.rs
10
src/main.rs
@ -1,13 +1,21 @@
|
||||
use rocket::{get, routes};
|
||||
|
||||
use rocket::http::Status;
|
||||
|
||||
#[get("/")]
|
||||
fn index() -> &'static str {
|
||||
"Hello, world!"
|
||||
}
|
||||
|
||||
#[get("/-1/error")]
|
||||
fn error() -> Status{
|
||||
Status::InternalServerError
|
||||
}
|
||||
|
||||
|
||||
#[shuttle_runtime::main]
|
||||
async fn main() -> shuttle_rocket::ShuttleRocket {
|
||||
let rocket = rocket::build().mount("/", routes![index]);
|
||||
let rocket = rocket::build().mount("/", routes![index, error]);
|
||||
|
||||
Ok(rocket.into())
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user