koa-mongo-rest
Advanced tools
Comparing version 0.1.0 to 0.1.1
@@ -8,7 +8,4 @@ var createModel, mongoose; | ||
mongoose.connect(mongoUrl); | ||
DocumentSchema = new mongoose.Schema(schema.schema, { | ||
collection: schema.collectionName, | ||
versionKey: schema.versionKey | ||
}); | ||
DocumentSchema = new mongoose.Schema(schema.schema, schema.options); | ||
return mongoose.model(schema.collectionName, DocumentSchema); | ||
}; |
{ | ||
"name": "koa-mongo-rest", | ||
"version": "0.1.0", | ||
"version": "0.1.1", | ||
"description": "generate REST API with koa and mongo", | ||
@@ -5,0 +5,0 @@ "main": "lib/index.js", |
@@ -35,3 +35,7 @@ # Koa mongo REST [![NPM version](https://badge.fury.io/js/koa-mongo-rest.png)](http://badge.fury.io/js/koa-mongo-rest) [![Dependency Status](https://gemnasium.com/t3chnoboy/koa-mongo-rest.png)](https://gemnasium.com/t3chnoboy/koa-mongo-rest) [![Build Status](https://travis-ci.org/t3chnoboy/koa-mongo-rest.png?branch=master)](https://travis-ci.org/t3chnoboy/koa-mongo-rest) | ||
}, | ||
collectionName: 'user' | ||
collectionName: 'user', //this is required | ||
//mongoose schema options (optional) | ||
options: { | ||
versionKey: false | ||
} | ||
}; | ||
@@ -38,0 +42,0 @@ ``` |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
67
194