pm2 is a process manager for node.js applications. You can use pm2 to host static websites. To host a static website, create a folder, put your files inside.
Let’s create a static file, say index.html
echo "Welcome" > /home/website/index.html
Now you can make the site live using the following pm2 command
pm2 serve /home/website 8082
Now the static site will […]
To auto start pm2 on boot, run
This will generate auto start script for your system. Once you started all applications, you can save it with
To uninstall, run
Running Application as Normal User First login as the user, then start the application using pm2.
Now save it.
Generate command […]
Auto Start pm2 on boot How to host static site using pm2 pm2 is a process manager for node.js applications. It is similar to forever. http://pm2.keymetrics.io First you need to install npm, on Ubuntu/Debian, run
To install pm2, run
Start an Application
Start an Application with name
pm2 start app.js -n "app-name-here"
Start Application in Cluster […]