Skip to content

Instantly share code, notes, and snippets.

@webislife
Created April 19, 2019 08:57
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 webislife/34d0c31c37bbb4598a54681635014913 to your computer and use it in GitHub Desktop.
Save webislife/34d0c31c37bbb4598a54681635014913 to your computer and use it in GitHub Desktop.
//Get current ENV
//Options reference: https://pm2.io/doc/en/runtime/reference/ecosystem-file/
const
ENV = process.env.APP_ENV,
ENV_CONF = require(`./pm2.${ENV}.js`);
if(ENV === undefined){
console.error(`ERROR: Undefined envoirment: ${ENV}. Start stopped.`);
process.exit(1);
}
module.exports = {
apps: ENV_CONF.APPS,
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment