koa-knexjs
Knex.js Middleware for Koa. Package is versioned in step with http://knexjs.org/#changelog
npm)
Installation (via $ npm install koa-knexjs --save # Then add one of the following (adding a --save) flag: $ npm install pg $ npm install sqlite3 $ npm install mysql $ npm install mysql2 $ npm install mariasql $ npm install strong-oracle $ npm install oracle $ npm install mssql $ npm install oracledb
Usage
var _ = ; var knex = ; ... app
Options
The following environment variables will be automatically used for the Knex.js connection object if set:
KOA_KNEX_HOST
KOA_KNEX_PORT
KOA_KNEX_USER
KOA_KNEX_PASSWORD
KOA_KNEX_DATABASE
KOA_KNEX_CHARSET
KOA_KNEX_SSL
KOA_KNEX_DEBUG
Changes
Repository forked from https://github.com/tjwebb/koa-knex-middleware The origial repository was forked for adding support to knex 0.12.x. As of now the following drivers are supported
- pg
- sqlite3
- mysql
- mysql2
- mariasql
- strong-oracle
- oracle
- oracledb
- mssql