Files
talk/services/env.js
T
Davis Shaver eddd63ae1a [Request for feedback] Heroku fix (#1721)
* Remove package-lock.json file, as Talk uses Yarn
* Silence ENV rewrite errors in Heroku
2018-07-05 09:06:49 -06:00

15 lines
577 B
JavaScript

// Ensure that we always process the rewrites silently, otherwise it may fail in
// environments like Heroku.
process.env.REWRITE_ENV_SILENT = 'TRUE';
// Perform rewrites to the runtime environment variables based on the contents
// of the process.env.REWRITE_ENV if it exists. This is done here as it is the
// entrypoint for the entire applications configuration.
require('env-rewrite').rewrite();
if (process.env.NODE_ENV !== 'test') {
// Apply all the configuration provided in the .env file if it isn't already
// in the environment.
require('dotenv').config();
}