pm2-run

Run arbitrary commands within a pm2 env

Usage no npm install needed!

<script type="module">
  import pm2Run from 'https://cdn.skypack.dev/pm2-run';
</script>

README

pm2-run

This is a small helper utility, which given a pm2 compatible ecosystem.json file, allows to run the commands with the same environment as pm2 would.

pm2-run --ecosystem ./example-ecosystem.json --env staging --cmd "node $PWD/test.js"