Description Usage Arguments Details
webServer.skeleton
creates a folder with all configuration files and
directories that will be needed by the R web server.
1 2 | webServer.skeleton(name = "myRWebServer", path = ".", port = 8080,
force = FALSE)
|
name |
the name of the directory to create |
path |
path where to create the directory |
port |
port that your application will be listening for |
force |
if TRUE and the directory already exists it will be overwritten |
In the application directory, webServer.skeleton
will create the following
files and folders :
rserve.conf: Rserve configuration file. you should not edit it.
onStartWebServer.R: script that is executed when server starts. You should not edit it.
packages: list of the libraries to load.
routes: Routes for your application
lib: All R files in this folder will be sourced when the application starts. Useful to define functions or constants.
data: all data files in this folder will be loaded when the application starts. The data files have to be created with the "save" function.
R: This folder contains the R files that will be executed when the
application receives a query. Each script have to define at least a function
called "run". When the server receives a query like
"http://myserver:8080/myRscript?x=1y=2
", it will source the script "myScript.R
"
and execute "run(x="1", y="2")
".
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.