An example REST API built with Rust, Actix Web, and MongoDB.
This project demonstrates how to:
- Build REST APIs using Actix Web
- Connect to MongoDB from Rust
- Perform CRUD operations with a NoSQL database
- Structure a Rust backend application using services and models
- Serialize and deserialize JSON using Serde
- Create owners
- Create dogs associated with owners
- Create bookings
- Cancel bookings
- Retrieve all bookings
- Store data in MongoDB
Create a .env file:
MONGODB_URI=mongodb+srv://<username>:<password>@cluster.mongodb.net/cargo runThe server starts on:
http://localhost:8585