更新一下session的设置
This commit is contained in:
parent
91feb12946
commit
9045019f97
1
app.js
1
app.js
|
|
@ -26,6 +26,7 @@ app.use(bodyParser.urlencoded({
|
|||
app.use(cookieParser());
|
||||
|
||||
app.use(session({
|
||||
rolling: true,
|
||||
resave: false, //添加这行
|
||||
saveUninitialized: true, //添加这行
|
||||
secret: 'ILoveYiJia', // 建议使用 128 个字符的随机字符串
|
||||
|
|
|
|||
|
|
@ -332,7 +332,7 @@ api.post('/getTitle', function(req, response) {
|
|||
var params = req.body.params;
|
||||
var url = params.url;
|
||||
read(url, function(err, article, meta) {
|
||||
console.log(article.title);
|
||||
console.log(article.title || 'Get title failed');
|
||||
response.json({
|
||||
title: article.title || '',
|
||||
});
|
||||
|
|
|
|||
Loading…
Reference in New Issue