Last active
June 23, 2022 11:30
-
-
Save kkemple/9b810e98dd9caa669580 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module.exports = { | |
development: { | |
client: 'postgresql', | |
connection: { | |
port: process.env.DATABASE_PORT, | |
host: process.env.DATABASE_HOST, | |
database: process.env.DATABASE_NAME, | |
user: process.env.DATABASE_USER, | |
password: process.env.DATABASE_ACCESS_KEY, | |
}, | |
pool: { | |
min: process.env.DATABASE_POOL_MIN, | |
max: process.env.DATABASE_POOL_MAX, | |
}, | |
migrations: { | |
directory: './db/migrations', | |
tableName: 'knex_migrations', | |
}, | |
seeds: { | |
directory: './db/seeds', | |
}, | |
}, | |
staging: { ... }, | |
test: { ... }, | |
production: { ... }, | |
} |
@lucianodouglasm2 just require the file into knexjs config and pass the data.
const connection = require('./connection-data');
module.exports = {
development: {
client: 'postgresql',
connection,
....
}
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
If by chance in the connection section I want to pass a file that exports all the data. How could I do it?