Cannot destructure property 'error' code example
Example: Cannot destructure property
var env = process.env.NODE_ENV; // 'dev' or 'test'
var dev = { app: { port: 3000 }, db: {user: '', pass: '', host: '', port: , name: '' }};
var test = { app: { port: 3000 }, db: {user: '', pass: '', host: '', port: , name: '' }};
var config = { dev, test };
module.exports = config[env];