koa-mongoose
koa-mongoose copied to clipboard
mongoose middleware for koa
``` node_modules/koa-mongoose/lib/mongoose.js:68 db.open(options.host, database, options.port, options) ^ ``` ``` app.use(mongoose({ user: MONGO_USER, pass: MONGO_PASS, host: MONGO_HOST, port: MONGO_PORT, database: MONGO_DB, mongodbOptions:{ poolSize: 5, native_parser: true } })); ```
getting this error. ``` app.use(mongoose({ uri: MONGO_CONNECTION, mongodbOptions:{ poolSize: 5, native_parser: true } })); ```
your github code is newest, but npm is not. can you update your code on npm. thanks very much.
I wasn't sure exactly what your package did, so I read the source code and spotted a logical programming error: https://github.com/Jackong/koa-mongoose/blob/676741f1676f3104fa320af5d6a6e6f0609f1ab6/lib/mongoose.js#L62 If `!options` is true, then `options` is falsy, so...
is there a way to connect to replica set? Please inform on the database options we need this is my current db options { "user" : "", "pass" : "",...
It would be very nice if I could connect to MongoDB using one [connection string](https://docs.mongodb.com/manual/reference/connection-string/) ruling them all instead of passing user, pass, host, port, and database.
Can you support Koa2? Thank you.
Should have been `import { mongoose } from 'koa-mongoose'` or `var mongoose = require('koa-mongoose').mongoose` Found this error when I tried to set data type as `data: { type: mongoose.Schema.Types.ObjectId }`
koa deprecated Support for generators will be removed in v3. See the documentation for examples of how to convert old middleware https://github.com/koajs/koa/blob/master/docs/migration.md src/index.js:16:5