EVOLUTION-MANAGER
Edit File: runServer.html
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><title>R: Run a server</title> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <link rel="stylesheet" type="text/css" href="R.css" /> </head><body> <table width="100%" summary="page for runServer {httpuv}"><tr><td>runServer {httpuv}</td><td style="text-align: right;">R Documentation</td></tr></table> <h2>Run a server</h2> <h3>Description</h3> <p>This is a convenience function that provides a simple way to call <code><a href="startServer.html">startServer</a></code>, <code><a href="service.html">service</a></code>, and <code><a href="stopServer.html">stopServer</a></code> in the correct sequence. It does not return unless interrupted or an error occurs. </p> <h3>Usage</h3> <pre> runServer(host, port, app, interruptIntervalMs = NULL) </pre> <h3>Arguments</h3> <table summary="R argblock"> <tr valign="top"><td><code>host</code></td> <td> <p>A string that is a valid IPv4 or IPv6 address that is owned by this server, which the application will listen on. <code>"0.0.0.0"</code> represents all IPv4 addresses and <code>"::/0"</code> represents all IPv6 addresses.</p> </td></tr> <tr valign="top"><td><code>port</code></td> <td> <p>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.</p> </td></tr> <tr valign="top"><td><code>app</code></td> <td> <p>A collection of functions that define your application. See <code><a href="startServer.html">startServer</a></code>.</p> </td></tr> <tr valign="top"><td><code>interruptIntervalMs</code></td> <td> <p>Deprecated (last used in httpuv 1.3.5).</p> </td></tr> </table> <h3>Details</h3> <p>If you have multiple hosts and/or ports to listen on, call the individual functions instead of <code>runServer</code>. </p> <h3>See Also</h3> <p><code><a href="startServer.html">startServer</a></code>, <code><a href="service.html">service</a></code>, <code><a href="stopServer.html">stopServer</a></code> </p> <h3>Examples</h3> <pre> ## Not run: # A very basic application runServer("0.0.0.0", 5000, list( call = function(req) { list( status = 200L, headers = list( 'Content-Type' = 'text/html' ), body = "Hello world!" ) } ) ) ## End(Not run) </pre> <hr /><div style="text-align: center;">[Package <em>httpuv</em> version 1.5.4 <a href="00Index.html">Index</a>]</div> </body></html>