env-options.js 422 B

123456789101112131415161718
  1. /* @flow */
  2. // ../config.js accepts options via environment variables
  3. const options = {}
  4. if (process.env.DOTENV_CONFIG_ENCODING != null) {
  5. options.encoding = process.env.DOTENV_CONFIG_ENCODING
  6. }
  7. if (process.env.DOTENV_CONFIG_PATH != null) {
  8. options.path = process.env.DOTENV_CONFIG_PATH
  9. }
  10. if (process.env.DOTENV_CONFIG_DEBUG != null) {
  11. options.debug = process.env.DOTENV_CONFIG_DEBUG
  12. }
  13. module.exports = options