Deploys an API from your local machine to make it available on the remote plumber server.
do_deploy_api(droplet, path, localPath, port, forward = FALSE, preflight)
The droplet on which to act. It's expected that this droplet
was provisioned using do_provision()
. See analogsea::droplet()
to
obtain a reference to a running droplet.
The remote path/name of the application
The local path to the API that you want to deploy. The
entire directory referenced will be deployed, and the plumber.R
file
inside of that directory will be used as the root plumber file. The
directory MUST contain a plumber.R
file.
The internal port on which this service should run. This will not
be user visible, but must be unique and point to a port that is available
on your server. If unsure, try a number around 8000
.
If TRUE
, will setup requests targeting the root URL on the
server to point to this application. See the do_forward()
function for
more details.
R commands to run after plumb()
ing the plumber.R
file,
but before run()
ing the plumber service. This is an opportunity to e.g.
add new filters. If you need to specify multiple commands, they should be
semi-colon-delimited.