Create a gist now

Instantly share code, notes, and snippets.

What would you like to do?
Gestión de la configuración
const config = require('./config');
console.log(config);
const config = require('./config.json');
Object.assign(module.exports, config.defaults, config[process.env.NODE_ENV])
{
"defaults": {
"hello": "world",
"foo": "bar"
},
"local": {
"foo": "bar local"
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment