解析form表单post过来数据出错
老师演示那个好像是最新的不能用了,老师帮忙看看怎么回事?还有node如何打断点,一般如何调试,简单说下,初次接触node,谢谢老师~
https://github.com/expressjs/body-parser
module.js:340
throw err;^
Error: Cannot find module '././binary_parser'
at Function.Module._resolveFilename (module.js:338:15)
at Function.Module._load (module.js:280:25)
at Module.require (module.js:364:17)
at require (module.js:380:17)
at exports.native.classes (D:\www\nodeweb\node_modules\bson\lib\bson\index.j
s:19:17)
var bodyParser = require('body-parser');
app.post('/admin/movie/new', function(req, res){
console.log("jjj");
app.use(bodyParser.urlencoded({extended: true}));
app.use(bodyParser.json());
console.log(req);
console.log(req.body);
exit();
var id = req.body.movie._id;
var movieObj = req.body.movie;
var _movie;