Minimal todo REST API built with Rust, Axum, Tokio, SQLx, and PostgreSQL.
- Rust 2021
- Axum
- Tokio
- SQLx
- PostgreSQL
- Serde
- UUID
- Create a
.envfile withDATABASE_URL=your_postgres_connection_string. - Build the project:
cargo build
- Seed sample data:
cargo seed
- Start the API at
http://127.0.0.1:3000:cargo run
GET /health-> health checkGET /todos-> list todosPOST /todos-> create todo with JSON body{ "title": "Learn Rust" }GET /todos/:id-> fetch one todoPATCH /todos/:id-> update fields with JSON body like{ "title": "Updated", "completed": true }DELETE /todos/:id-> delete one todo
curl http://127.0.0.1:3000/health
curl http://127.0.0.1:3000/todos
curl http://127.0.0.1:3000/todos/11111111-1111-1111-1111-111111111111No license is currently specified for this repository.