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
(Indie Deal) Handy Games, Offworld, Citi...
Last Post: xSicKxBot
Yesterday 10:43 AM
» Replies: 0
» Views: 45
News - Pokemon-With-Guns Game Palworld C...
Last Post: xSicKxBot
Yesterday 10:42 AM
» Replies: 0
» Views: 11
(Xbox 360) Mod Forza Horizon 2 with USB
Last Post: tekashisama
Yesterday 02:45 AM
» Replies: 11
» Views: 10538
[Tut] How to Create a NumPy Array and Fi...
Last Post: xSicKxBot
Yesterday 02:45 AM
» Replies: 0
» Views: 31
(Indie Deal) War Giveaways, Akupara, Hum...
Last Post: xSicKxBot
Yesterday 02:45 AM
» Replies: 0
» Views: 13
News - Death’s Gambit: Afterlife Physica...
Last Post: xSicKxBot
Yesterday 02:44 AM
» Replies: 0
» Views: 15
News - Xbox Game Pass Adding Another Day...
Last Post: xSicKxBot
Yesterday 02:44 AM
» Replies: 0
» Views: 18
[Tut] How To Apply A Function To Each El...
Last Post: xSicKxBot
01-26-2022 04:46 PM
» Replies: 0
» Views: 28
(Indie Deal) Exotic Riddles Bundle, Dyin...
Last Post: xSicKxBot
01-26-2022 04:45 PM
» Replies: 0
» Views: 17
Mobile - Pokémon Sword and Shield myster...
Last Post: xSicKxBot
01-26-2022 04:45 PM
» Replies: 0
» Views: 14

[-]
Twitter



Discord Server © SickGaming.net 2012-2021