Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

List all environment parameters using pm2 command

I am recently using pm2 to deploy my server on AWS EC2. I started my production using:

pm2 start server

where server.js is the main production.

I used some environment variables for the production, and they can be accessed via processes.env.Var_Name. However, I am not sure if these variables are loaded correctly, so I would like to know how to list all the variables.

I've tried pm2 show id or pm2 describe id but they does not list the variables properly, the variables are not listed in the output.

Thank you and kind regards.


1 Answers

Try running pm2 env id. You can get id by running the pm2 list command.

I use it on pm2 version 4.5.6

like image 182
Hamza Sabljakovic Avatar answered Jul 30 '26 19:07

Hamza Sabljakovic



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!