This is a simple REST API written in Rust using the Axum web framework. All credits goes to Jeremy Chone with his awesome tutorial.
This tutorial is divided into 3 parts:
- Beginner:
- First route Hello World
- Quick Dev Setup
- Hello Params / Path
- Static file router
- Intermediate:
- Api login
- Resposne Mapper layer
- Cookies
- Model for CRUD operations
- API routes
- Advanced:
- Custom auth middleware
- Custom extractor (Ctx)
- Ctx from REST to CRUD model api
- Optimisations on Ctx middleware
- Advance error handling (Client vs Server)
- Logging
Execute the following command to run the dev test:
cargo watch -q -c -w tests/ -x "test -q quick_dev -- --nocapture"
Execute the following command to run the api:
cargo watch -q -c -w src/ -x run
Also the course code is available here.