Saving State via PM2 on a VPS Server
With PM2, you can save the current list of scripts so that they automatically restart after a server reboot.
To do this, you first need to initialize the saving:
terminalpm2 startup
After this, whenever the list of scripts changes, you need to save the current state:
terminalpm2 save
Задание 1
Start your test scripts in the usual way. Reboot the server. Make sure that the sites are not working.
Задание 2
Save the running scripts. Reboot the server. Make sure that the sites are now working.