Stack Overflow Asked by Chiahao on March 2, 2021
When I run my index.js
file, I am getting Configuration property "mail.host" is not defined
. I don’t understand why.
config.get('name')
works fine. I set my NODE_ENV=production
. Can anyone please help?
index.js
const config = require('config');
console.log(config.get('name'));
console.log(config.get('mail.host'));
production.json
{
"name": "My app - production",
"mail": {
"host": "production-server"
}
}
It works after restarting my Terminal.
Answered by Chiahao on March 2, 2021
Get help from others!
Recent Answers
Recent Questions
© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP