node.js - Is it possible to get index of the slave process at the runtime? -


suppose run pm2 in cluster mode pm2 start app.js -i 4, possible information current number in instances pool inside app.js.

i mean in app-0 0, in app-1 1, etc. need number @ runtime.

i didn't find references in docs.

i found!

process.env.pm_id 

thanks guy


Comments