From 344efb9da32916607ed8394a68b5b50ed903e5da Mon Sep 17 00:00:00 2001 From: Laura Carvajal Date: Mon, 17 Oct 2016 12:12:55 +0100 Subject: [PATCH] allow for .js config --- config.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/config.js b/config.js index f9e8744..ffd84ca 100644 --- a/config.js +++ b/config.js @@ -18,9 +18,12 @@ const fs = require('fs'); const environment = (process.env.NODE_ENV || 'development'); const jsonPath = `./config/${environment}.json`; +const jsPath = `./config/${environment}.js`; if (fs.existsSync(jsonPath)) { module.exports = require(jsonPath); +} else if (fs.existsSync(jsPath)) { + module.exports = require(jsPath); } else { module.exports = { port: Number(env('PORT', '4000')),