Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/developit/restful-mongoose

:bird: Expose Mongoose models as RESTful Express resources.
https://github.com/developit/restful-mongoose

Last synced: 13 days ago
JSON representation

:bird: Expose Mongoose models as RESTful Express resources.

Awesome Lists containing this project

README

        

# restful-mongoose [![NPM Version](http://img.shields.io/npm/v/restful-mongoose.svg?style=flat)](https://npmjs.com/package/restful-mongoose)

> Expose Mongoose models as RESTful Express resources.

## Installation

Available on [npm](https://npmjs.com/package/restful-mongoose):

```sh
npm install restful-mongoose
```

## Usage

```js
import restfulMongoose from 'restful-mongoose';

// any mongoose Model:
import Foo from '../models/foo';

// create and export a Router, mount it anywhere via .use()
export default restfulMongoose('foo', Foo);
```