-
- Notifications
You must be signed in to change notification settings - Fork 3.9k
Closed
Milestone
Description
Interestingly, when upgrading to 4.4.1 (from 4.3.x), I noticed that returning the mongoose object doesn't work anymore,
import mongoose from 'mongoose'; export const init = co.wrap(function* _init() { yield mongoose.connect( config.mongodbUri, { server: { socketOptions: { keepAlive: 1, }, }, replset: { socketOptions: { keepAlive: 1, }, }, } ); mongoose.connection.on('error', (err) => { process.exit(1); }); return mongoose; });always returns undefined. Within this function, it's all fine; mongoose is the fat object it used to be. I'm puzzled as to why this may happen.
Metadata
Metadata
Assignees
Labels
No labels