bamei-module-express-session-file
Advanced tools
Comparing version 0.0.6 to 0.0.7
15
index.js
@@ -23,14 +23,12 @@ 'use strict'; | ||
/** | ||
* 配置: | ||
* {Boolean} resave 默认 true,参考 bamei-module-express-session | ||
* {Boolean} saveUninitialized 默认 true,参考 bamei-module-express-session | ||
* {String} secret 默认使用 config.express.cookie.secret 的配置,参考 bamei-module-express-session | ||
* {Object} store 本地文件配置,默认 { path: './sessions' },参考 session-file-store | ||
*/ | ||
// 填充默认配置 | ||
exports.config = function fillDefaultConfig(config) { | ||
return Object.assign({ | ||
// 参考 express-session 模块 | ||
resave: true, | ||
// 参考 express-session 模块 | ||
saveUninitialized: true, | ||
secret: this.getConfigOrDefault('config.express.cookie.secret', ''), | ||
// 安全密钥,参考 express-session 模块 | ||
secret: this.getConfigOrDefault('express.cookie.secret', ''), | ||
// 存储引擎,参考 session-file-store 模块 | ||
store: { path: './sessions' }, | ||
@@ -40,2 +38,3 @@ }, config); | ||
// 初始化 | ||
exports.init = function initExpressSessionFileModule(ref, config, done) { | ||
@@ -42,0 +41,0 @@ |
{ | ||
"name": "bamei-module-express-session-file", | ||
"version": "0.0.6", | ||
"description": "module-express-session-file", | ||
"version": "0.0.7", | ||
"description": "express 框架的 session 支持,使用文件存储", | ||
"main": "index.js", | ||
@@ -6,0 +6,0 @@ "scripts": { |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
No README
QualityPackage does not have a README. This may indicate a failed publish or a low quality package.
Found 1 instance in 1 package
4758
3
1
86
39