do_deploy_api {plumberDeploy}R Documentation

Deploy or Update an API

Description

Deploys an API from your local machine to make it available on the remote plumber server.

Usage

do_deploy_api(
  droplet,
  path,
  localPath,
  port,
  forward = FALSE,
  docs = FALSE,
  preflight,
  overwrite = FALSE,
  ...
)

Arguments

droplet

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.

path

The remote path/name of the application

localPath

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.

port

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.

forward

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.

docs

If TRUE, will enable the documentation interface for the remotely deployed API. By default, the interface is disabled.

preflight

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.

overwrite

if an application is already running for this path name, and overwrite = TRUE, then do_remove_api will be run.

...

additional arguments to pass to analogsea::droplet_ssh() or analogsea::droplet_upload(), such as keyfile. Cannot contain remote, local as named arguments.

Value

The DigitalOcean droplet, but called for side effects


[Package plumberDeploy version 0.2.1 Index]