egg-knex
knex plugin for egg
Install
$ npm i egg-knex-promise --save
Usage
// {app_root}/config/plugin.jsexportsknex = enable: true package: 'egg-knex-promise';
Configuration
// {app_root}/config/config.default.jsexportsknex = client: 'sqlite3' connection: filename: './test.db3' ;
see Knex.js for more detail.
Example
// {app_root}/controller/home.js async { const data = await thisapp; thisctxbody = data; }
Questions & Suggestions
Please open an issue here.