servePhantasus | R Documentation |
servePhantasus
starts http server handling phantasus static files
and opencpu server.
servePhantasus(
host = getPhantasusConf("host"),
port = getPhantasusConf("port"),
staticRoot = getPhantasusConf("static_root"),
preloadedDir = getPhantasusConf("preloaded_dir"),
openInBrowser = TRUE,
quiet = TRUE,
background = FALSE
)
host |
Host to listen. |
port |
Port to listen. |
staticRoot |
Path to static files with phantasus.js (on local file system). |
preloadedDir |
Full path to directory with preloaded files. |
openInBrowser |
Boolean value which states if application will be automatically loaded in default browser. |
quiet |
Boolean value which states whether the connection log should be hidden (default: TRUE) |
background |
Boolean value which states whether the server should be started in background (default: FALSE) |
A handle to the server as returned by 'httpuv::startServer'
## Not run:
s <- servePhantasus(background=FALSE)
s$stop()
## End(Not run)
httpuv::stopAllServers() # can be used if handle is lost
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.