Created
March 2, 2018 06:10
-
-
Save blogui91/095c7ced08e3fe22f2b2e267da6854a8 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const DotEnv = require('dotenv') | |
const parsedEnv = DotEnv.config().parsed | |
module.exports = function () { | |
// Let's stringify our variables | |
for (key in parsedEnv) { | |
if (typeof parsedEnv[key] === 'string') { | |
parsedEnv[key] = JSON.stringify(parsedEnv[key]) | |
} | |
} | |
return parsedEnv | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment