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" }}