Skip to content

Instantly share code, notes, and snippets.

@alifrizkip
Created February 7, 2018 07:16
Show Gist options
  • Save alifrizkip/3231168e2951dd62122e80b693c6bcb7 to your computer and use it in GitHub Desktop.
Save alifrizkip/3231168e2951dd62122e80b693c6bcb7 to your computer and use it in GitHub Desktop.
require('dotenv').config()
const knex = require('knex')({
client: 'mysql',
connection: {
host: process.env.DB_HOST,
user: process.env.DB_USER,
password: process.env.DB_PASS,
database: process.env.DB_NAME
}
})
module.exports = knex
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment