Skip to content

Commit

Permalink
Debug config
Browse files Browse the repository at this point in the history
  • Loading branch information
vgrichina committed Jun 28, 2019
1 parent 70d1a8a commit 14827b3
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions get-config.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,11 @@
module.exports = function getConfig() {
const configPath = process.cwd() + '/src/config';
try {
return require(configPath)(process.env.NODE_ENV || 'development');
const config = require(configPath)(process.env.NODE_ENV || 'development');
console.log(config);
return config;
} catch (e) {
console.log(`[WARNING] Didn't find config at ${configPath}\n`);
return {};
}
}
}

0 comments on commit 14827b3

Please sign in to comment.