knex-logger
v0.1.0
Published
Express middleware to log Knex.js queries
Downloads
6,547
Maintainers
Readme
knex-logger
Express middleware for logging queries made by Knex.js.
Install
npm install knex-logger
avn setup
Use
var env = process.env.NODE_ENV || 'development';
var knexConfig = require('./knexfile.js')[env];
var knex = require('knex')(knexConfig);
var express = require('express');
var knexLogger = require('knex-logger');
var app = express();
app.use(knexLogger(knex));
License
This project is distributed under the MIT license.