0
0
Node.jsframework~10 mins

PM2 for process management in Node.js - Interactive Code Practice

Choose your learning style9 modes available
Practice - 5 Tasks
Answer the questions below
1fill in blank
easy

Complete the code to start an app with PM2.

Node.js
pm2 [1] app.js
Drag options to blanks, or click blank then click option'
Alaunch
Brun
Cexecute
Dstart
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'run' or 'launch' instead of 'start' causes errors.
2fill in blank
medium

Complete the code to list all running PM2 processes.

Node.js
pm2 [1]
Drag options to blanks, or click blank then click option'
Astatus
Bshow
Clist
Dinfo
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'show' or 'info' instead of 'list' does not display all processes.
3fill in blank
hard

Fix the error in the command to restart a process by name.

Node.js
pm2 [1] myApp
Drag options to blanks, or click blank then click option'
Areload
Brestart
Creset
Drefresh
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'reload' or 'reset' instead of 'restart' causes unexpected behavior.
4fill in blank
hard

Fill both blanks to stop and delete a PM2 process by id.

Node.js
pm2 [1] [2] && pm2 delete [2]
Drag options to blanks, or click blank then click option'
Astop
Brestart
C2
D1
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'restart' instead of 'stop' or wrong process id causes failure.
5fill in blank
hard

Fill all three blanks to save the current PM2 process list and setup startup script.

Node.js
pm2 [1] && pm2 [2] && pm2 [3]
Drag options to blanks, or click blank then click option'
Asave
Bstartup
Clist
Dreload
Attempts:
3 left
💡 Hint
Common Mistakes
Mixing command order or using wrong commands causes startup issues.