How can I start a service, when server boots (next js on VPS)
Unanswered
Tiphiid wasp posted this in #help-forum
Tiphiid waspOP
I have created a service which does some updates on the db every hour, but not sure to initialise this when next js boots
1 Reply
Toyger
depends on how you host it
pm2 probably easiest way, you install pm2 , make it run on init with https://pm2.keymetrics.io/docs/usage/startup/
and then you run nextjs with pm2 with any tutorial and run pm2 save
if you run it with docker you need set your docker containers to restart unless stopped.
pm2 probably easiest way, you install pm2 , make it run on init with https://pm2.keymetrics.io/docs/usage/startup/
and then you run nextjs with pm2 with any tutorial and run pm2 save
if you run it with docker you need set your docker containers to restart unless stopped.