Initial commit

This commit is contained in:
Jack Mechem 2026-03-26 18:23:17 -07:00
commit 812abbe4f5
6 changed files with 694 additions and 0 deletions

27
src/main.rs Normal file
View file

@ -0,0 +1,27 @@
use axum::{
body::Body,
routing::get,
response::Json,
Router,
};
use serde_json::{Value, json};
#[tokio::main]
async fn main() {
let app = Router::new()
.route("/", get(root))
.route("/stats", get(get_stats));
let listener = tokio::net::TcpListener::bind("0.0.0.0:3001").await.unwrap();
axum::serve(listener, app).await.unwrap();
}
// which calls one of these handlers
async fn root() {}
async fn get_stats() -> Json<Value> {
Json(json!({ "data": 67 }))
}