https://github.com/wpcodevo/rust-mongodb-crud
This comprehensive guide will teach you how to build a CRUD (Create, Read, Update, and Delete) API using the Rust programming language and MongoDB as the database.
https://github.com/wpcodevo/rust-mongodb-crud
api crud crud-api docker docker-compose mongodb rest-api restful-api rust rust-lang rust-language server warp
Last synced: 3 months ago
JSON representation
This comprehensive guide will teach you how to build a CRUD (Create, Read, Update, and Delete) API using the Rust programming language and MongoDB as the database.
- Host: GitHub
- URL: https://github.com/wpcodevo/rust-mongodb-crud
- Owner: wpcodevo
- Created: 2023-01-18T06:54:49.000Z (over 2 years ago)
- Default Branch: master
- Last Pushed: 2023-01-18T21:49:02.000Z (over 2 years ago)
- Last Synced: 2025-03-24T02:07:00.887Z (3 months ago)
- Topics: api, crud, crud-api, docker, docker-compose, mongodb, rest-api, restful-api, rust, rust-lang, rust-language, server, warp
- Language: Rust
- Homepage: https://codevoweb.com/build-a-crud-api-with-rust-and-mongodb/
- Size: 21.5 KB
- Stars: 9
- Watchers: 2
- Forks: 3
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Build a CRUD API with Rust and MongoDB
This comprehensive guide will teach you how to build a CRUD (Create, Read, Update, and Delete) API using the Rust programming language and MongoDB as the database. The Rust API will run on a Warp HTTP server and use the MongoDB Rust driver to persist data in a MongoDB database.

## Topics Covered
- Run the Rust MongoDB CRUD Project Locally
- Run the Rust API with a Frontend
- Setup the Rust Project
- Setup MongoDB
- Create the Database Model
- Create the API Response Structs
- Create the API Request Structs
- Handle MongoDB and Application Errors
- Create the MongoDB CRUD Functions
- Connect to the MongoDB Database
- Convert Document to Struct
- Perform Multiple READ Operations
- Perform CREATE Operation
- Perform Single READ Operation
- Perform UPDATE Operation
- Perform DELETE Operation
- Implement the CRUD Functions
- Retrieve Documents
- Create a New Document
- Get a Single Document
- Edit a Document
- Delete a Document
- Register the Routes and Add CORSRead the entire article here: [https://codevoweb.com/build-a-crud-api-with-rust-and-mongodb/](https://codevoweb.com/build-a-crud-api-with-rust-and-mongodb/)