Create an account


Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
How to Install pm2 with npm for a Production Process Manager (multi js script manager

#1
How to Install pm2 with npm for a Production Process Manager (multi js script manager)

This is an easy way to start stop your js scripts within the npm environment.

This can also save to start up.

Tutorial How to Install pm2 with npm


Install pm2

With yarn:
Code:
yarn global add pm2

With npm:
Code:
npm install pm2 -g


With debian, use the install script:
Code:
apt update && apt install sudo curl && curl -sL https://raw.githubusercontent.com/Unitech/pm2/master/packager/setup.deb.sh | sudo -E bash -



By default, CLI autocompletion is not installed with PM2, we recommend it:
Code:
pm2 completion install


Source map files are autodetected by default if they are present (
Code:
app.js.map

for
Code:
app.js
).


What are source map files? If using Babel, Typescript or any other Javascript superset, you may have noticed that stacktraces are not meaningful, errors not pointing to the right line. Source map files can be used to solve this problem.


Update pm2 for npm

Keep your pm2 up to date with:
Code:
npm install pm2 -g && pm2 update

Code:
pm2 update
is necessary in order to refresh the PM2 daemon.

Hope this helps!
[Image: RvghcKs.png]
Reply



Forum Jump:


Users browsing this thread:
1 Guest(s)

[-]
Discord

[-]
Active Threads
(Free Game Key) Crime Cities - Free GOG ...
Last Post: xSicKxBot
Today 11:23 PM
» Replies: 0
» Views: 0
News - Gallery: Here’s What Zelda: Breat...
Last Post: xSicKxBot
Today 11:22 PM
» Replies: 0
» Views: 0
News - The Rock All But Confirms He's A ...
Last Post: xSicKxBot
Today 11:22 PM
» Replies: 0
» Views: 0
(Free Game Key) Dead by Daylight & while...
Last Post: xSicKxBot
Today 07:05 PM
» Replies: 0
» Views: 16
News - Pokemon Go Incense Day Features S...
Last Post: xSicKxBot
Today 07:04 PM
» Replies: 0
» Views: 2
[Tut] Pandas DataFrame Indexing
Last Post: xSicKxBot
Today 03:04 PM
» Replies: 0
» Views: 15
[Tut] Stripe Apple Pay Web Integration w...
Last Post: xSicKxBot
Today 03:04 PM
» Replies: 0
» Views: 2
(Indie Deal) BF Scratchy Week: PlayStati...
Last Post: xSicKxBot
Today 03:04 PM
» Replies: 0
» Views: 2
Mobile - Fishing Simulator codes – free ...
Last Post: xSicKxBot
Today 03:04 PM
» Replies: 0
» Views: 1
AppleInsider - Apple reportedly telling ...
Last Post: xSicKxBot
Today 03:04 PM
» Replies: 0
» Views: 2

[-]
Twitter

[-]
Sponsored
Get the Deal of the Week at RefurBees.com



Discord Server © SickGaming.net 2012-2021