Skip to content

Latest commit

 

History

History
45 lines (34 loc) · 945 Bytes

pm2.md

File metadata and controls

45 lines (34 loc) · 945 Bytes
title description created updated
PM2 ( Process Manager for NodeJS )
PM2 is a popular NodeJS process manager that will help you run your NodeJS application in production
2019-07-22
2019-07-22

PM2 is a popular NodeJS process manager that will help you run your NodeJS application in production

Installation

npm install pm2 -g

Starting application

You can start the application ( let's say your starting point is app.js ) using following command

pm2 start app.js

Following are some of the options you can use along with it

Option Description
--name Specifying the app with a name, helps to look after it later
--watch application will restart on file changes

Managing processes

Restarting the application

pm2 restart app_name/app_id

Stopping the application

pm2 stop app_name/app_id

Deleting the application

pm2 delete app_name/app_id