2017-6-20. 2-3没有跑通的同志们可以看看我的,,改动有点多,这里说一下
1. 引入的包的改动,分别是serve-static和body-parser(自行用npm安装)看最热评论,这个我就不说了。
2.关于a链接的数据参数 , 将视频中的#{"item._id"} 改成如下格式,更加清晰简单人性化对吧
a(href="/movie/"+item._id)。
还是不行看我的。
https://github.com/dirstart/node.js-learn/tree/master/practice/website
1. 引入的包的改动,分别是serve-static和body-parser(自行用npm安装)看最热评论,这个我就不说了。
2.关于a链接的数据参数 , 将视频中的#{"item._id"} 改成如下格式,更加清晰简单人性化对吧
a(href="/movie/"+item._id)。
还是不行看我的。
https://github.com/dirstart/node.js-learn/tree/master/practice/website
2017-06-20
poster随便写的没有'//'开头,一查看详情就报错停止进程。查了下是mPromise的问题,在连接数据库之前加一行:mongoose.Promise = global.Promise,使用node自带的promise替换mongoose的promise就好了。
2017-06-20
最新回答 / IT丶杰
Cast to ObjectId failed for value "undefined" at path "_id"$ node app.jsimooc started on port3000(node:5188) DeprecationWarning: `open()` is deprecated in mongoose >= 4.11.0, use `openUri()` instead, orset the `useMongoClient` option if using `connect...
2017-06-19
TypeError: Cannot read property 'title' of undefined
2017-06-19
已采纳回答 / 慕沐8464911
link(href="/bootstrap/dist/css/bootstrap.css" type='text/css' rel="stylesheet")herf ==> href
2017-06-13
通过下面的操作就可以得到与老师一样的效果:
1 npm install jade 改为 npm install pug
2 app.js中的app.set('view engine','jade) 改为 app.set('view engine','pug')
3 创建index.jade等四个文件时改为以pug为后缀index.pug
1 npm install jade 改为 npm install pug
2 app.js中的app.set('view engine','jade) 改为 app.set('view engine','pug')
3 创建index.jade等四个文件时改为以pug为后缀index.pug
2017-06-09