Skip to content

Instantly share code, notes, and snippets.

@Wonder2210
Created May 29, 2020 03:34
Show Gist options
  • Save Wonder2210/5fdb77172286962633b2bc8ae8a683e6 to your computer and use it in GitHub Desktop.
Save Wonder2210/5fdb77172286962633b2bc8ae8a683e6 to your computer and use it in GitHub Desktop.
Basic knex config
require('ts-node/register');
module.exports = {
development:{
client: 'pg',
connection: {
database: "my_db",
user: "username",
password: "password"
},
pool: {
min: 2,
max: 10
},
migrations: {
tableName: 'knex_migrations',
directory: 'migrations'
},
timezone: 'UTC'
},
testing:{
client: 'pg',
connection: {
database: "my_db",
user: "username",
password: "password"
},
pool: {
min: 2,
max: 10
},
migrations: {
tableName: 'knex_migrations',
directory: 'migrations'
},
timezone: 'UTC'
},
production:{
client: 'pg',
connection: {
database: "my_db",
user: "username",
password: "password"
},
pool: {
min: 2,
max: 10
},
migrations: {
tableName: 'knex_migrations',
directory: 'migrations'
},
timezone: 'UTC'
}
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment