pm2
pm2 copied to clipboard
Using API, env vars can't be set for daemon spawn process
What's going wrong?
pm2.connect()
doesn't accept env vars for when a new daemon
https://pm2.keymetrics.io/docs/usage/pm2-api/
How could we reproduce this issue?
N/A
Supporting information
Code location where the env vars should be passed on to child_process.spawn
https://github.com/Unitech/pm2/blob/master/lib/Daemon.js#L49
I may try to implement if pm2 team says this feature would be welcomed.
Optionally, we could just implement passing an options object directly to the spawn call