0
0
Expressframework~10 mins

PM2 for process management in Express - 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 Express app using PM2.

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

Complete the code to list all running processes managed by PM2.

Express
pm2 [1]
Drag options to blanks, or click blank then click option'
Alist
Bshow
Cstatus
Dinfo
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'show' or 'info' does not list all processes.
3fill in blank
hard

Fix the error in the command to restart a process named 'server'.

Express
pm2 [1] server
Drag options to blanks, or click blank then click option'
Arestart
Breload
Creset
Drefresh
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'reload' or 'reset' does not restart the process correctly.
4fill in blank
hard

Fill both blanks to stop and delete a process with id 3.

Express
pm2 [1] 3 && pm2 [2] 3
Drag options to blanks, or click blank then click option'
Astop
Bdelete
Ckill
Dremove
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'kill' or 'remove' instead of 'stop' or 'delete' causes errors.
5fill in blank
hard

Fill all three blanks to save the current PM2 process list and configure it to start on boot.

Express
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 up 'list' or missing 'save' causes processes not to restart on boot.