How can I run pm2 on a certain node version?

Use pm2 and specify node version using –interpreter flag with node version absolute path: sudo pm2 start app.js –interpreter=/home/ken/.nvm/v4.4.2/bin/node or sudo pm2 start app.js –interpreter=/home/ken/.nvm/v7.4.0/bin/node etc.. If you change the node version wherever I mentioned –interpreter=”***..” the app will run in exact node version. Once you completed the above approach to verify use following command … Read more

Kill a Docker Container

You will be able to see currently running docker containers using below command. docker ps Then copy the CONTAINER ID of the running container and execute the following command docker stop <container_id> Please replace with a real value.

What’s the difference between pm2 and pm2-runtime?

The main difference between pm2 and pm2-runtime is pm2-runtime designed for Docker container which keeps an application in the foreground which keep the container running, pm2 is designed for normal usage where you send or run the application in the background. In simple words, the life of the container is the life of CMD or … Read more

Start app as root with pm2

I had problems with sudo pm2 start api, but this was since pm2 was already running without sudo privileges, therefor you need to run: pm2 kill sudo pm2 start api This kills the pm2 deamon first, so that it starts in sudo, but then you need sudo for ALL pm2 commands afterwards, like: sudo pm2 … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)