mirror of
https://github.com/supleed2/cch23-8bit.git
synced 2024-12-22 14:05:48 +00:00
Initial commit, including day -1 tasks
This commit is contained in:
commit
c43e97e5b9
3
.gitignore
vendored
Normal file
3
.gitignore
vendored
Normal file
|
@ -0,0 +1,3 @@
|
||||||
|
/target
|
||||||
|
.shuttle-storage
|
||||||
|
Secrets*.toml
|
2390
Cargo.lock
generated
Normal file
2390
Cargo.lock
generated
Normal file
File diff suppressed because it is too large
Load diff
11
Cargo.toml
Normal file
11
Cargo.toml
Normal file
|
@ -0,0 +1,11 @@
|
||||||
|
[package]
|
||||||
|
name = "cch23-8bit"
|
||||||
|
version = "0.1.0"
|
||||||
|
edition = "2021"
|
||||||
|
|
||||||
|
[dependencies]
|
||||||
|
axum = "0.6.20"
|
||||||
|
shuttle-axum = "0.34.0"
|
||||||
|
shuttle-runtime = "0.34.0"
|
||||||
|
tokio = "1.28.2"
|
||||||
|
tracing = "0.1.40"
|
18
src/main.rs
Normal file
18
src/main.rs
Normal file
|
@ -0,0 +1,18 @@
|
||||||
|
use axum::{http::StatusCode, response::IntoResponse, routing::get, Router};
|
||||||
|
|
||||||
|
async fn hello_world() -> impl IntoResponse {
|
||||||
|
"Hello, world!"
|
||||||
|
}
|
||||||
|
|
||||||
|
async fn fake_error() -> impl IntoResponse {
|
||||||
|
StatusCode::INTERNAL_SERVER_ERROR
|
||||||
|
}
|
||||||
|
|
||||||
|
#[shuttle_runtime::main]
|
||||||
|
async fn main() -> shuttle_axum::ShuttleAxum {
|
||||||
|
let router = Router::new()
|
||||||
|
.route("/", get(hello_world))
|
||||||
|
.route("/-1/error", get(fake_error));
|
||||||
|
|
||||||
|
Ok(router.into())
|
||||||
|
}
|
Loading…
Reference in a new issue