So I'm remaking some of the backend code of my company (from Java) in NodeJS. One of the things I'm focusing on is using technologies and libraries similar to what is already being used to ease my colleagues transition to the new code. Since they use Hibernate, I plan on using Sequelize ORM.
The thing is, Sequelize comes by default configured for the 3 main environment options for NodeJS, development, test and production. Here at my company we have a fourth environment which is "homol"(homologation) which is an environment where some user can test the final product before it goes into production.
How can I add and configure my project to include this fourth environment? I do realize I can just add a new parameter inside the config.json file, but how do I configure the entire Sequelize package to target that specific environment?
{
"development": {
"username": "postgres",
"password": "postgres",
"database": "postgres",
"host": "127.0.0.1",
"dialect": "postgres",
"operatorsAliases": false
},
"homol": { //How to configure Sequelize to target this new environment
"username": "postgres",
"password": "postgres",
"database": "postgres",
"host": "127.0.0.1",
"dialect": "postgres",
"operatorsAliases": false
},
"test": {
"username": "postgres",
"password": "postgres",
"database": "postgres",
"host": "127.0.0.1",
"dialect": "postgres",
"operatorsAliases": false
},
"production": {
"username": "postgres",
"password": "postgres",
"database": "postgres",
"host": "127.0.0.1",
"dialect": "postgres",
"operatorsAliases": false
}
}
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…