Skip to content

Instantly share code, notes, and snippets.

@blogui91
Created March 2, 2018 06:10
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save blogui91/095c7ced08e3fe22f2b2e267da6854a8 to your computer and use it in GitHub Desktop.
Save blogui91/095c7ced08e3fe22f2b2e267da6854a8 to your computer and use it in GitHub Desktop.
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