jrcryer / generator-mean

Yeoman generator for a MEAN stack, inspired by mean.io
MIT License
120 stars 25 forks source link

Error: "Required MongoStore option `db` missing or is not a string." #21

Open dothanhlam opened 9 years ago

dothanhlam commented 9 years ago

Since the application could not start due to MongoStore updates, in 'express.js', please change the connection as below :

From app.use(session({ secret: config.sessionSecret, store: new MongoStore({ db: db.connection.db, collection: config.sessionCollection }) }));

To app.use(session({ secret: config.sessionSecret, store: new MongoStore({ mongooseConnection: db.connection, collection: config.sessionCollection }) }));

adamelevate commented 9 years ago

same issue