servePhantasus: Serve phantasus.

View source: R/serve.R

servePhantasusR Documentation

Serve phantasus.

Description

servePhantasus starts http server handling phantasus static files and opencpu server.

Usage

servePhantasus(
  host = getPhantasusConf("host"),
  port = getPhantasusConf("port"),
  staticRoot = getPhantasusConf("static_root"),
  preloadedDir = getPhantasusConf("preloaded_dir"),
  openInBrowser = TRUE,
  quiet = TRUE,
  background = FALSE
)

Arguments

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)

Value

A handle to the server as returned by 'httpuv::startServer'

Examples

## Not run: 
s <- servePhantasus(background=FALSE)
s$stop()

## End(Not run)

httpuv::stopAllServers() # can be used if handle is lost

baba-beda/morpheusR documentation built on Oct. 10, 2024, 1:35 a.m.