# Minecraft-Computer-Craft-API-Backend Ein minimales Rust-API-Backend mit `axum` und SQLite (`sqlx`). ## Voraussetzungen - Rust (stable) - Cargo ## Starten ```powershell cargo run ``` Standardwerte: - `PORT=3000` - `DATABASE_URL=sqlite://data/app.db` Optional per Umgebungsvariablen setzen: ```powershell $env:PORT="3000" $env:DATABASE_URL="sqlite://data/app.db" cargo run ``` ## Endpunkte - `GET /health` -> API-Status - `GET /db-test` -> Testet DB-Verbindung (`SELECT 1`) Beispielaufrufe: ```powershell curl http://127.0.0.1:3000/health curl http://127.0.0.1:3000/db-test ``` ## Projektstruktur - `src/main.rs` - Serverstart, Router, App-State - `src/db.rs` - SQLite-Pool + Basisschema - `src/routes.rs` - API-Handler