I am trying to push our R project from local to a production server using Digital Ocean. I've created a droplet, ssh into the server, installed R and plumber, and when I run the plumber command, I can access the endpoint via URL in browser. However, when I close the ssh session, the R/plumber stops servicing. How do I make it so that it is running 24/7 even if I am not ssh into the server like how nginx or apache serves in the background?
Thank you for the reply! I've seen that plumber page on hosting but didn't read it full. This time, I read the entire page and, yes, it looks like I can use pm2 to persist the service. I'll give that a try.
I was able to get the API up and running in the background. The documentation suggested pm2 but I used the supervisor tool instead and it worked out. The documentation could be updated to include supervisor. It was easier to work with without having to install node and npm.