recipe_app/backend/knexfile.js
2025-07-15 12:02:11 -07:00

40 lines
665 B
JavaScript

require('dotenv').config();
module.exports = {
development: {
client: 'postgresql',
connection: {
host: 'db',
port: 5432,
database: process.env.DB_NAME,
user: process.env.DB_USER,
password: process.env.DB_PASSWORD
},
pool: {
min: 2,
max: 10
},
migrations: {
tableName: 'knex_migrations',
directory: './migrations'
}
},
production: {
client: 'postgresql',
connection: {
database: 'my_db',
user: 'username',
password: 'password'
},
pool: {
min: 2,
max: 10
},
migrations: {
tableName: 'knex_migrations'
}
}
};