# mongo_service **Repository Path**: j-f-liu/mongo_service ## Basic Information - **Project Name**: mongo_service - **Description**: General CRUD RESTful APIs for MongoDB - **Primary Language**: Unknown - **License**: MIT - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2020-11-13 - **Last Updated**: 2022-07-04 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # mongo_service [![Crates.io](https://img.shields.io/crates/v/mongo_service.svg)](https://crates.io/crates/mongo_service) [![Docs](https://docs.rs/mongo_service/badge.svg)](https://docs.rs/mongo_service) General CRUD RESTful APIs for MongoDB. ### Routes - /:collection - GET - Get object list - POST - Create new object - /:collection/:id - GET - Get object - PUT - Update object with new field values - PATCH - Update object with MongoDB update operators - DELETE - Delete object ### Usage ```rust use mongodb::Client; let client = Client::with_uri_str("mongodb://localhost:27017").await?; let mut app = tide::new(); app.at("/user").nest(mongo_service::user(client.database("account"))); app.at("/data").nest(mongo_service::data(client.database("database"))); app.listen("127.0.0.1:8080").await?; ```