bamei-module-knex-mysql
Advanced tools
Comparing version 0.0.7 to 0.0.8
{ | ||
"name": "bamei-module-knex-mysql", | ||
"version": "0.0.7", | ||
"version": "0.0.8", | ||
"description": "knex 支持,使用 mysql 存储", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -42,11 +42,15 @@ [![NPM version][npm-image]][npm-url] | ||
```javascript | ||
// 使用 this.config.get('knex-mysql') 的配置初始化 | ||
this.module('knex-mysql'); | ||
// 或者 | ||
// 自定义配置初始化 | ||
const options = {}; | ||
this.module('knex-mysql', options); | ||
module.exports = require('bamei').create(function (ctx) { | ||
// 使用 ctx.config.get('knex-mysql') 的配置初始化 | ||
ctx.module('knex-mysql'); | ||
// 或者 | ||
// 自定义配置初始化 | ||
const options = {}; | ||
ctx.module('knex-mysql', options); | ||
}); | ||
``` | ||
## License | ||
@@ -53,0 +57,0 @@ |
3576
80