https://github.com/vngrs/konfig
Konfig is a config loader module which allows you to load json and yaml files automatically by environment in node.js applications. You can also define dynamic values which can be used especially for dynamic environment variables on Heroku like services.
Example config file:
default:
port: 3000
cache_assets: true
secret_key: 7EHDWHD9W9UW9FBFB949394BWYFG8WE78F
development:
cache_assets: false
test:
port: 3001
staging:
<<: *production
production: &production
port: #{process.env.PORT}
secret_key: 3F8RRJR30UHERGUH8UERHGIUERHG3987GH8