Initial commit, including day -1 tasks

This commit is contained in:
Aadi Desai 2023-12-01 12:59:39 +00:00
commit c43e97e5b9
Signed by: supleed2
SSH key fingerprint: SHA256:CkbNRs0yVzXEiUp2zd0PSxsfRUMFF9bLlKXtE1xEbKM
4 changed files with 2422 additions and 0 deletions

3
.gitignore vendored Normal file
View file

@ -0,0 +1,3 @@
/target
.shuttle-storage
Secrets*.toml

2390
Cargo.lock generated Normal file

File diff suppressed because it is too large Load diff

11
Cargo.toml Normal file
View 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
View 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())
}