Quantcast
Channel: Active questions tagged config - Stack Overflow
Viewing all articles
Browse latest Browse all 5049

Why am I getting "Configuration property is not defined"?

$
0
0

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

Viewing all articles
Browse latest Browse all 5049

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>