https://github.com/rumkin/mongo-rest-api
Mongo REST API middleware
https://github.com/rumkin/mongo-rest-api
Last synced: about 1 year ago
JSON representation
Mongo REST API middleware
- Host: GitHub
- URL: https://github.com/rumkin/mongo-rest-api
- Owner: rumkin
- License: other
- Created: 2017-02-11T17:15:22.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2017-02-11T17:55:20.000Z (over 9 years ago)
- Last Synced: 2025-01-30T03:26:21.688Z (over 1 year ago)
- Language: JavaScript
- Size: 4.88 KB
- Stars: 1
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: readme.md
- Changelog: changelog.md
- License: LICENSE
Awesome Lists containing this project
README
# MongoDB REST API
Express-like mongodb REST API middleware.
Test coverage: **93%**.
## Install
Via npm:
```bash
npm i mongo-rest-api
```
## Usage
Use as regular middleware:
```
const express = require('express');
const mongodb = require('mongodb');
const mongoRestApi = require('mongo-rest-api');
mondodb.connect()
.then((db) => {
express()
.use(mongoRestApi(db))
.listen();
});
```
## NOTE
**IMPORTANT** Mongo REST API uses `uuid` to generate `_id` for new documents.
## License
MIT.