I decided to learn rust by building a simple REST API. Currently, the plan is to learn how to build a simple REST interface using the language without introducing any complexities such as databases, caching, or authentication, etc. This project is a web server that exposes a few endpoints doing dummy CRUD operations. The next step would be to introduce OpenAPI docs generation (done), and then dockerise & deploy it to the cloud (deployed).
- Make sure you have rust installed
- Clone the repo locally
- Run this command in terminal:
cargo run
- it starts the server - To test the APIs locally, either use the postman collection or use the auto-generated OpenAPI docs by visiting
http://localhost:8080/swagger-ui/
- Open (or download & install) Postman
- Import the API collection from postman/collection.json
- Import postman/environment.json as your new environment