Mongoose connection not working
You can try the credentials like this mongoose.createConnection('mongodb://username:password@host:port/database')
as below,
var db = mongoose.createConnection('mongodb://' + user + ':' + pass + '..');
Also, you can change this to mongoose.connect
instead of mongoose.createConnection
as below,
var db = mongoose.connect('mongodb://username:password@host:port/database');var store = new MongoStore({ mongooseConnection: db.connection});