windows下nodejs常见错误

1.express-session

express-session deprecated undefined resave option; provide resave option auth_s
erver.js:16:9
express-session deprecated undefined saveUninitialized option; provide saveUnini
tialized option auth_server.js:16:9

解决:

app.use(session({
secret: cookie_secret,
resave: true,
saveUninitialized: true
}));

2.body-parse

body-parse deprecated undefined resave option; provide resave option auth_s
erver.js:16:9

解决:

app.use(bodyParser.urlencoded({
extended: true
}));
app.use(bodyParser.json());

  

上一篇:移动端 H5 拍照 从手机选择图片,移动端预览,图片压缩,图片预览,再上传服务器


下一篇:Java面向对象高级--抽象类的基本概念------abstract