runServer: Run a server

Description Usage Arguments Details See Also

Description

This is a convenience function that provides a simple way to call startServer, service, and stopServer in the correct sequence. It does not return unless interrupted or an error occurs.

Usage

1
2
runServer(host, port, app, interruptIntervalMs = ifelse(interactive(), 100,
  1000))

Arguments

host

A string that is a valid IPv4 address that is owned by this server, or "0.0.0.0" to listen on all IP addresses.

port

A number or integer that indicates the server port that should be listened on. Note that on most Unix-like systems including Linux and Mac OS X, port numbers smaller than 1025 require root privileges.

app

A collection of functions that define your application. See startServer.

interruptIntervalMs

How often to check for interrupt. The default should be appropriate for most situations.

Details

If you have multiple hosts and/or ports to listen on, call the individual functions instead of runServer.

See Also

startServer, service, stopServer



Search within the httpuv package
Search all R packages, documentation and source code

Questions? Problems? Suggestions? or email at ian@mutexlabs.com.

Please suggest features or report bugs with the GitHub issue tracker.

All documentation is copyright its authors; we didn't write any of that.