var connect = require('connect'); var app = connect() .use(connect.cookieParser()) .use(function(req,res){ console.log(req.cookie); console.log(req.signedCookies); }).listen(3000);提示:connect.cookieParser is not a function;在用 bodyParser的時候也會提示,網(wǎng)上說是從connect中脫離出來了,要重新 npm install cookieParser ,那bodyParser 也需要嗎,所有的 自帶中間件都需要?
在node中引用了connect之后,用它自帶的中間件總是會報(bào)錯
慕慕森
2018-08-10 10:10:28