// Basic usage
app.use(session({
store: MongoStore.create({ mongoUrl: 'mongodb://localhost/test-app' })
}));
// Advanced usage
app.use(session({
store: MongoStore.create({
mongoUrl: 'mongodb://user12345:foobar@localhost/test-app?authSource=admin&w=1',
mongoOptions: advancedOptions // See below for details
})
}));
UnhandledPromiseRejectionWarning: TypeError: con.db is not a function connect-mongo 连接数据库方法
最新推荐文章于 2024-05-21 23:45:08 发布