https://github.com/jia58960/express-movie 在现有功能的基础上扩充了一些功能并持续优化中。欢迎关注~
2016-09-30
亲测成功
var session = require('express-session')
var mongoose = require('mongoose')
var mongoStore = require('connect-mongo')(session)
app.use(session({
secret: 'imooc',
store: new mongoStore({
url: dbUrl,
collection: 'sessions',
}),
resave: false,
saveUninitialized: true
}))
var session = require('express-session')
var mongoose = require('mongoose')
var mongoStore = require('connect-mongo')(session)
app.use(session({
secret: 'imooc',
store: new mongoStore({
url: dbUrl,
collection: 'sessions',
}),
resave: false,
saveUninitialized: true
}))
2016-09-30
花了接近两周的时间看完了而且也自己消化了,虽然课程略长,但真的每节课都能学到不少东西。个人觉得这样的课程应该小小的收费下才行~哈哈
2016-09-29
已采纳回答 / helloworldcd
app.set(‘env’, ‘production’) 入口文件配置生产环境。set NODE_ENV=production WIN命令行设置
2016-09-28
不理解populate方法的path option这些参数意思的童鞋建议去看下这篇文章 https://segmentfault.com/a/1190000002727265
2016-09-26