Learn R Programming

RestRserve (version 0.1.5)

restrserve_deploy: Deploys RestRserve application to a directory

Description

Takes file with RestRserve application, generates Rserve configuration and put it to a specified directory. Later application could be started with restrserve_start.

Usage

restrserve_deploy(file, dir = "RestRserveApplication",
  configuration = restrserve_default_conf(), configuration_file = NULL,
  pid_file = file.path(dir, "Rserve.pid"), start_from_snapshot = TRUE)

Arguments

file

file with user code. In order to deploy application user have to creates instance of RestRserveApplication with a name RestRserveApp.

dir

'character, path to the directory where to deploy application and configuration

configuration

character vector - names are Rserve configuration parameters and values are corresponding configuration entries

configuration_file

NULL or path to a file with Rserve configuration. If not NULL then values of the configuration_file will be added after parameter values from configuration argument above.

pid_file

character, path to a file where to put PID after starting application (after restrserve_start call).

start_from_snapshot

logical whether to use snapshot of the user code from to start application. User supplied code from file will be copied to the dir. Copy of the file will have a name current_app_snapshot.R. If start_from_snapshot = TRUE (default) then application will be started using current_app_snapshot.R file. If start_from_snapshot = FALSE then original file will be used.

Value

TRUE invisibly if deployment was successful