create_server | R Documentation |
The package is based on httpuv::.
It is designed to host static resources such as html, javascript, css, etc along with specific route requests
to perform various R based actions or respond with various content(i.g. JSON strings, images, etc). The server
is designed to work in a local host environment (i.e. url = 127.0.0.1) as part of an html/javascript project that
needs a link to R language capabilities and its associated packages. As per the httpuv::
documentation, the
server can be stopped by calling httpuv::stopServer(server=name_of_server)
. Also to list the current running
server(s) call httpuv::listServers()
.
create_server( index_path = NULL, port = 8080, routes = NULL, static_paths = NULL )
index_path |
A string that defines the full directory path to an |
port |
An integer that defines the port number for the server. The default is 8080. |
routes |
A vector of |
static_paths |
A named list that defines the locations of static resources (.css, .html, .js files) for hosting by the server. The list name is the web path (e.g. "/content") and the value is the full directory path to the resources (e.g. F:/web_server/content). |
A httpuv::WebServer
Rick Dean
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.