在线时间:8:00-16:00
迪恩网络APP
随时随地掌握行业动态
扫描二维码
关注迪恩网络微信公众号
开源软件名称:tjwebb/koa-knex-middleware开源软件地址:https://github.com/tjwebb/koa-knex-middleware开源编程语言:JavaScript 100.0%开源软件介绍:koa-knex-middlewareKnex.js Middleware for Koa. Package is versioned in step with http://knexjs.org/#changelog npm)0. Installation (via $ npm install koa-knex --save 1. Usage (contrived example) var _ = require('koa-route');
var knex = require('koa-knex');
...
app.use(knex({
client: 'pg',
connection: {
/** typical knex connection object */
}
});
app.use(_.get('/:userid', function *(userid) {
this.body = {
profile: yield this.knex('users').where('id', userid);
};
}); 2. OptionsThe following environment variables will be automatically used for the Knex.js connection object if set:
License |
2023-10-27
2022-08-15
2022-08-17
2022-09-23
2022-08-13
请发表评论