Skip to content

Commit

Permalink
chore(env): update knex config to match NODE_ENV values
Browse files Browse the repository at this point in the history
  • Loading branch information
Aminejvm committed Aug 9, 2021
1 parent 4f1b0d9 commit 7aa1039
Showing 1 changed file with 26 additions and 21 deletions.
47 changes: 26 additions & 21 deletions knexfile.js
Original file line number Diff line number Diff line change
@@ -1,26 +1,31 @@
import * as Environment from "~/node_common/environment";

module.exports = {
development: {
client: "pg",
connection: {
ssl: true,
port: 5432,
host: Environment.POSTGRES_HOSTNAME,
database: Environment.POSTGRES_DATABASE,
user: Environment.POSTGRES_ADMIN_USERNAME,
password: Environment.POSTGRES_ADMIN_PASSWORD,
},
const developmentConfig = {
client: "pg",
connection: {
ssl: true,
port: 5432,
host: Environment.POSTGRES_HOSTNAME,
database: Environment.POSTGRES_DATABASE,
user: Environment.POSTGRES_ADMIN_USERNAME,
password: Environment.POSTGRES_ADMIN_PASSWORD,
},
production: {
client: "pg",
connection: {
ssl: true,
port: 5432,
host: Environment.POSTGRES_HOSTNAME,
database: Environment.POSTGRES_DATABASE,
user: Environment.POSTGRES_ADMIN_USERNAME,
password: Environment.POSTGRES_ADMIN_PASSWORD,
},
};

const productionConfig = {
client: "pg",
connection: {
ssl: true,
port: 5432,
host: Environment.POSTGRES_HOSTNAME,
database: Environment.POSTGRES_DATABASE,
user: Environment.POSTGRES_ADMIN_USERNAME,
password: Environment.POSTGRES_ADMIN_PASSWORD,
},
};

module.exports = {
development: developmentConfig,
staging: productionConfig,
production: productionConfig,
};

0 comments on commit 7aa1039

Please sign in to comment.