- Be sure to have the latest version of Rust installed.
- In case we get to the part of getting some data from a database (which I hope so), you will also need to have PostgreSQL installed.
- Install rust-analyzer in your VSCode.
- Install Postman or curl.
- Optional, just for debugging purposes, install CodeLLDB in your VSCode
- Verify that everyone has the correct setup before beginning.
- Create a project using Cargo.
- Introduction to dependency management.
- Write a healh-check endpoint.
- Write a simple REST API.
- Usage of the dotenv crate.
- Usage of middlewares
- Introduction to the SQLx crate.
- Introduction to the Tokio Tracing crate.
- Introduction to actix-web-prom crate
- Testing
- Verify that everything works as expected.
- Cargo basics
- REST API
- Dependency management
- Inmutability by default
- Option / Result types
- Error handling
- Module visibility
- Traits
- Async/Await
- Logging
- Metrics
- Distributed tracing
- Macros
- Tests with Mockall
You'll need docker.
cargo make db-setup
cargo make db-migrate
In the assets folder you'll find a json file that you can import into your Postman client.
Lab image by freepik.com