set environment variables in pm2 code example Example: pm2 --env pm2 restart pm2.json --env production