| WebServer {httpuv} | R Documentation |
WebServer class
Description
This class represents a web server running one application. Multiple servers can be running at the same time.
Methods
initialize(host, port, app)-
Create a new
WebServerobject.appis an httpuv application object as described instartServer. getHost()Return the value of
hostthat was passed toinitialize().getPort()Return the value of
portthat was passed toinitialize().stop()Stops a running server.
isRunning()Returns TRUE if the server is currently running.
getStaticPaths()Returns a list of
staticPathobjects for the server.setStaticPath(..., .list = NULL)Sets a static path for the current server. Each static path can be given as a named argument, or as an named item in
.list. If there already exists a static path with the same name, it will be replaced.removeStaticPath(path)Removes a static path with the given name.
getStaticPathOptions()Returns a list of default
staticPathOptionsfor the current server. Each static path will use these options by default, but they can be overridden for each static path.setStaticPathOption(..., .list = NULL)Sets one or more static path options. Each option can be given as a named argument, or as a named item in
.list.
Super class
httpuv::Server -> WebServer
Methods
Public methods
Inherited methods
Method new()
Usage
WebServer$new(host, port, app, quiet = FALSE)
Method getHost()
Usage
WebServer$getHost()
Method getPort()
Usage
WebServer$getPort()
See Also
Server and PipeServer.