Running in the background - holy-unblocker/website-legacy-aio GitHub Wiki

Running in the background

This will not work for Replit. You need a server that isn't a little Replit box.

PM2

You can run website-aio via PM2 by doing the following:

  1. Install PM2 globally

    npm i -g pm2
    
  2. Start website-aio inside PM2 under the name "website-aio"

    Make sure to run this inside the website-aio directory

    pm2 start "npm start" --name "website-aio"
    

This should now start it in the background. You may want to enable PM2 at startup:

pm2 startup

Make sure to run any systemctl commands that pm2 startup outputs.

If you want to restore anything in PM2 after a reboot, run pm2 resurrect