env-options.js 518 B

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