Create database connections pool #28

Merged
bilal.catic merged 3 commits from create-database-connections-pool into master 2019-07-25 06:29:45 +02:00
Showing only changes of commit 26458d9957 - Show all commits

View File

@@ -1,3 +1,9 @@
const pool = {
max: parseInt(process.env.DB_POOL_MAX_CONNECTIONS) || 5,
acquire: parseInt(process.env.DB_POOL_ACQUIRE) || 60000,
evict: parseInt(process.env.DB_POOL_EVICT) || 1000,
};
module.exports = {
development: {
username: 'docker',
@@ -5,14 +11,17 @@ module.exports = {
database: 'CrmIntegration',
port: '5431',
dialect: 'postgres',
logging: parseInt(process.env.SEQUELIZE_LOGGING) ? console.log : false
logging: parseInt(process.env.SEQUELIZE_LOGGING) ? console.log : false,
pool
},
test: {
"use_env_variable": 'DATABASE_URL',
logging: parseInt(process.env.SEQUELIZE_LOGGING) ? console.log : false
logging: parseInt(process.env.SEQUELIZE_LOGGING) ? console.log : false,
pool
},
production: {
"use_env_variable": 'DATABASE_URL',
logging: parseInt(process.env.SEQUELIZE_LOGGING) ? console.log : false
logging: parseInt(process.env.SEQUELIZE_LOGGING) ? console.log : false,
pool
}
};