node.js - Can we do profiling in Javascript -


i have js file contain configuration code like:

module.exports = {         database: {             username: 'devusername',             password: 'devpassword',             host: 'xx.xx.xx.xx',             port: 27017,             name: 'admin'                    } }; 

the username,password,host,port , name can change according enviornment. development, qa, production. every time when change environment need modify js file.is there way can keep details , values respective environment.

thanks in advance

you can set these settings using environment variables grab them via process.env. way, long environment variables named same, it's matter of having environment provisioning setup provide them.


Comments

Popular posts from this blog

php - Permission denied. Laravel linux server -

google bigquery - Delta between query execution time and Java query call to finish -

python - Pandas two dataframes multiplication? -