bamei-module-express-session
Advanced tools
Comparing version 0.0.7 to 0.0.8
@@ -41,3 +41,3 @@ 'use strict'; | ||
config = exports.config.call(this, config); | ||
this.getLogger('init').info('initExpressSessionModule config: %j', config); | ||
this.getLogger('init').trace('initExpressSessionModule config: %j', config); | ||
@@ -44,0 +44,0 @@ const middleware = expressSession(config); |
{ | ||
"name": "bamei-module-express-session", | ||
"version": "0.0.7", | ||
"version": "0.0.8", | ||
"description": "express 框架的 session 支持", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -50,13 +50,17 @@ [![NPM version][npm-image]][npm-url] | ||
```javascript | ||
// 先初始化依赖的模块 | ||
this.module('express'); | ||
// 使用 this.config.get('express-session') 的配置初始化 | ||
this.module('express-session'); | ||
// 或者 | ||
// 自定义配置初始化 | ||
const options = {}; | ||
this.module('express-session', options); | ||
module.exports = require('bamei').create(function (ctx) { | ||
// 先初始化依赖的模块 | ||
ctx.module('express'); | ||
// 使用 ctx.config.get('express-session') 的配置初始化 | ||
ctx.module('express-session'); | ||
// 或者 | ||
// 自定义配置初始化 | ||
const options = {}; | ||
ctx.module('express-session', options); | ||
}); | ||
``` | ||
## License | ||
@@ -63,0 +67,0 @@ |
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
4539
90