I am using plumber to deploy an R api to digital ocean. It's hard to provide a reproducible example here but what I want is for the swagger endpoint to compile and be available. It works locally but not on the digital ocean server.
Locally I do this:
library(plumber)
r <- plumb("api/plumber.R")
r$run(port=8000)
now the swagger docs are available at: http://127.0.0.1:8000/__swagger__/
When I deploy to the server as follows:
library(analogsea)
library(plumber)
my_droplet <- as.droplet("my_droplet")
do_deploy_api(
droplet = my_droplet,
path = "my_path",
localPath = "my_local_path",
port = 8000
)
do_forward(my_droplet, "my_path")
Now I go to [my_remote_ip]/my_path/__swagger__/ I get a 404.
Anyone know how to do this? Much appreciated.