UNPKG

@loopback/docs

Version:
803 lines (529 loc) 17.1 kB
<!DOCTYPE html> <!--[if lt IE 7]> <html class="no-js lt-ie9 lt-ie8 lt-ie7"> <![endif]--> <!--[if IE 7]> <html class="no-js lt-ie9 lt-ie8"> <![endif]--> <!--[if IE 8]> <html class="no-js lt-ie9"> <![endif]--> <!--[if gt IE 8]><!--> <html class="no-js"> <!--<![endif]--> <head> <meta charset="utf-8"> <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"> <title></title> <meta name="description" content=""> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <link rel="stylesheet" href="css/bootstrap.min.css"> <link rel="stylesheet" href="css/code-themes/sl-theme.css"> <link rel="stylesheet" href="css/main.css"> </head> <body> <div class="navbar navbar-inverse navbar-static-top" role="navigation"> <div class="navbar-header"> <button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse"> <span class="icon-bar"></span> <span class="icon-bar"></span> <span class="icon-bar"></span> </button> <a class="navbar-brand" href="/">docs.strongloop.com</a> </div> <div id="modules"></div> </div> <div class="row"> <div class="col-lg-3 column scroll-spy-target"> <ul class="nav nav-pills nav-stacked"> <div id="versions"></div> <li class="depth-3"> <a href="#HttpServer">Class: HttpServer</a> </li> <li class="depth-4"> <a href="#HttpServer.constructor">constructor()</a> </li> <li class="depth-4"> <a href="#HttpServer.address">&gt;address</a> </li> <li class="depth-4"> <a href="#HttpServer.host">&gt;host</a> </li> <li class="depth-4"> <a href="#HttpServer.listening">&gt;listening</a> </li> <li class="depth-4"> <a href="#HttpServer.port">&gt;port</a> </li> <li class="depth-4"> <a href="#HttpServer.protocol">&gt;protocol</a> </li> <li class="depth-4"> <a href="#HttpServer.url">&gt;url</a> </li> <li class="depth-4"> <a href="#HttpServer.prototype.start">start()</a> </li> <li class="depth-4"> <a href="#HttpServer.prototype.stop">stop()</a> </li> <li class="depth-3"> <a href="#HttpOptions">Interface: HttpOptions</a> </li> <li class="depth-4"> <a href="#HttpOptions.prototype.protocol">protocol</a> </li> <li class="depth-3"> <a href="#HttpsOptions">Interface: HttpsOptions</a> </li> <li class="depth-4"> <a href="#HttpsOptions.prototype.protocol">protocol</a> </li> <li class="depth-3"> <a href="#ListenerOptions">Interface: ListenerOptions</a> </li> <li class="depth-4"> <a href="#ListenerOptions.prototype.host">host</a> </li> <li class="depth-4"> <a href="#ListenerOptions.prototype.port">port</a> </li> <li class="depth-3"> <a href="#HttpProtocol">Type: HttpProtocol</a> </li> <li class="depth-3"> <a href="#HttpServerOptions">Type: HttpServerOptions</a> </li> <li class="depth-3"> <a href="#RequestListener">Type: RequestListener</a> </li> </ul> </div> <div class="col-lg-9 col-lg-offset-3 column" data-spy="scroll" data-target=".scroll-spy-target" data-offset="0"> <div class="readability"> <section class="code-doc "> <a name="HttpServer"></a> <h3 class="code-ref">Class: httpserver = new HttpServer()</h3> <!-- Used for displaying comments in Class, Interface, Properties Constructor, Function and Parameters of constructor or function. (Excludes Type alias). --> <div class="code-desc"> <p><p>HTTP / HTTPS server used by LoopBack&#39;s RestServer</p> </p> <p></p> </div> </section> <section class="code-doc "> <a name="HttpServer.constructor"></a> <h4 class="code-ref">constructor(requestListener: <a href="#RequestListener">RequestListener</a>, serverOptions: <a href="#HttpServerOptions">HttpServerOptions</a>) : <a href="#HttpServer">HttpServer</a></h4> <!-- Used for displaying comments in Class, Interface, Properties Constructor, Function and Parameters of constructor or function. (Excludes Type alias). --> <div class="code-desc"> <p></p> <p></p> </div> <!-- A table of members such as parameters/properties/variables --> <div class="code-arguments-hdr">Parameters</div> <table class="params code-arguments"> <tr> <th class="hdr-name">Name</th> <th class="hdr-type">Type</th> <th class="hdr-default-value">Default Value</th> <th class="hdr-flags">Flags</th> <th class="hdr-desc">Description</th> </tr> <tr class="code-arg"> <td> <a name=""></a> <strong class="code-arg-name"> requestListener </strong> </td> <td class="code-arg-types"> <code><a href="#RequestListener">RequestListener</a></code> </td> <td class="code-arg-default-value"> </td> <td class="code-arg-flags"> </td> <td class="code-arg-desc"> <!-- Used for displaying comments in Class, Interface, Properties Constructor, Function and Parameters of constructor or function. (Excludes Type alias). --> <div class="code-desc"> <p></p> <p></p> </div> </td> </tr> <tr class="code-arg"> <td> <a name=""></a> <strong class="code-arg-name"> serverOptions </strong> </td> <td class="code-arg-types"> <code><a href="#HttpServerOptions">HttpServerOptions</a></code> </td> <td class="code-arg-default-value"> </td> <td class="code-arg-flags"> optional </td> <td class="code-arg-desc"> <!-- Used for displaying comments in Class, Interface, Properties Constructor, Function and Parameters of constructor or function. (Excludes Type alias). --> <div class="code-desc"> <p></p> <p></p> </div> </td> </tr> </table> </section> <section class="code-doc "> <a name="HttpServer.address"></a> <h4 class="code-ref">address() : <a href="#AddressInfo">AddressInfo</a> | undefined</h4> <!-- Used for displaying comments in Class, Interface, Properties Constructor, Function and Parameters of constructor or function. (Excludes Type alias). --> <div class="code-desc"> <p>Address of the HTTP / HTTPS server</p> <p></p> </div> </section> <section class="code-doc "> <a name="HttpServer.host"></a> <h4 class="code-ref">host() : string | undefined</h4> <!-- Used for displaying comments in Class, Interface, Properties Constructor, Function and Parameters of constructor or function. (Excludes Type alias). --> <div class="code-desc"> <p>Host of the HTTP / HTTPS server</p> <p></p> </div> </section> <section class="code-doc "> <a name="HttpServer.listening"></a> <h4 class="code-ref">listening() : boolean</h4> <!-- Used for displaying comments in Class, Interface, Properties Constructor, Function and Parameters of constructor or function. (Excludes Type alias). --> <div class="code-desc"> <p>State of the HTTP / HTTPS server</p> <p></p> </div> </section> <section class="code-doc "> <a name="HttpServer.port"></a> <h4 class="code-ref">port() : number</h4> <!-- Used for displaying comments in Class, Interface, Properties Constructor, Function and Parameters of constructor or function. (Excludes Type alias). --> <div class="code-desc"> <p>Port number of the HTTP / HTTPS server</p> <p></p> </div> </section> <section class="code-doc "> <a name="HttpServer.protocol"></a> <h4 class="code-ref">protocol() : <a href="#HttpProtocol">HttpProtocol</a></h4> <!-- Used for displaying comments in Class, Interface, Properties Constructor, Function and Parameters of constructor or function. (Excludes Type alias). --> <div class="code-desc"> <p>Protocol of the HTTP / HTTPS server</p> <p></p> </div> </section> <section class="code-doc "> <a name="HttpServer.url"></a> <h4 class="code-ref">url() : string</h4> <!-- Used for displaying comments in Class, Interface, Properties Constructor, Function and Parameters of constructor or function. (Excludes Type alias). --> <div class="code-desc"> <p>URL of the HTTP / HTTPS server</p> <p></p> </div> </section> <section class="code-doc "> <a name="HttpServer.prototype.start"></a> <h4 class="code-ref">start() : <a href="#Promise">Promise</a>&lt;void&gt;</h4> <!-- Used for displaying comments in Class, Interface, Properties Constructor, Function and Parameters of constructor or function. (Excludes Type alias). --> <div class="code-desc"> <p><p>Starts the HTTP / HTTPS server</p> </p> <p></p> </div> </section> <section class="code-doc "> <a name="HttpServer.prototype.stop"></a> <h4 class="code-ref">stop() : <a href="#Promise">Promise</a>&lt;void&gt;</h4> <!-- Used for displaying comments in Class, Interface, Properties Constructor, Function and Parameters of constructor or function. (Excludes Type alias). --> <div class="code-desc"> <p><p>Stops the HTTP / HTTPS server</p> </p> <p></p> </div> </section> <section class="code-doc "> <a name="HttpOptions"></a> <h3 class="code-ref">Interface: HttpOptions</h3> <!-- Used for displaying comments in Class, Interface, Properties Constructor, Function and Parameters of constructor or function. (Excludes Type alias). --> <div class="code-desc"> <p><p>HTTP server options</p> </p> <p></p> </div> </section> <section class="code-doc"> <!-- A table of members such as parameters/properties/variables --> <div class="code-arguments-hdr">Properties</div> <table class="params code-arguments"> <tr> <th class="hdr-name">Name</th> <th class="hdr-type">Type</th> <th class="hdr-default-value">Default Value</th> <th class="hdr-flags">Flags</th> <th class="hdr-desc">Description</th> </tr> <tr class="code-arg"> <td> <a name="HttpOptions.prototype.protocol"></a> <strong class="code-arg-name"> protocol </strong> </td> <td class="code-arg-types"> <code>undefined | </code> </td> <td class="code-arg-default-value"> </td> <td class="code-arg-flags"> exported optional </td> <td class="code-arg-desc"> <!-- Used for displaying comments in Class, Interface, Properties Constructor, Function and Parameters of constructor or function. (Excludes Type alias). --> <div class="code-desc"> <p><p>HTTP server options</p> </p> <p></p> </div> </td> </tr> </table> </section> <section class="code-doc "> <a name="HttpsOptions"></a> <h3 class="code-ref">Interface: HttpsOptions</h3> <!-- Used for displaying comments in Class, Interface, Properties Constructor, Function and Parameters of constructor or function. (Excludes Type alias). --> <div class="code-desc"> <p><p>HTTPS server options</p> </p> <p></p> </div> </section> <section class="code-doc"> <!-- A table of members such as parameters/properties/variables --> <div class="code-arguments-hdr">Properties</div> <table class="params code-arguments"> <tr> <th class="hdr-name">Name</th> <th class="hdr-type">Type</th> <th class="hdr-default-value">Default Value</th> <th class="hdr-flags">Flags</th> <th class="hdr-desc">Description</th> </tr> <tr class="code-arg"> <td> <a name="HttpsOptions.prototype.protocol"></a> <strong class="code-arg-name"> protocol </strong> </td> <td class="code-arg-types"> <code></code> </td> <td class="code-arg-default-value"> </td> <td class="code-arg-flags"> exported </td> <td class="code-arg-desc"> <!-- Used for displaying comments in Class, Interface, Properties Constructor, Function and Parameters of constructor or function. (Excludes Type alias). --> <div class="code-desc"> <p><p>HTTPS server options</p> </p> <p></p> </div> </td> </tr> </table> </section> <section class="code-doc "> <a name="ListenerOptions"></a> <h3 class="code-ref">Interface: ListenerOptions</h3> <!-- Used for displaying comments in Class, Interface, Properties Constructor, Function and Parameters of constructor or function. (Excludes Type alias). --> <div class="code-desc"> <p><p>Basic HTTP server listener options</p> </p> <p></p> </div> </section> <section class="code-doc"> <!-- A table of members such as parameters/properties/variables --> <div class="code-arguments-hdr">Properties</div> <table class="params code-arguments"> <tr> <th class="hdr-name">Name</th> <th class="hdr-type">Type</th> <th class="hdr-default-value">Default Value</th> <th class="hdr-flags">Flags</th> <th class="hdr-desc">Description</th> </tr> <tr class="code-arg"> <td> <a name="ListenerOptions.prototype.host"></a> <strong class="code-arg-name"> host </strong> </td> <td class="code-arg-types"> <code>undefined | string</code> </td> <td class="code-arg-default-value"> </td> <td class="code-arg-flags"> exported optional </td> <td class="code-arg-desc"> <!-- Used for displaying comments in Class, Interface, Properties Constructor, Function and Parameters of constructor or function. (Excludes Type alias). --> <div class="code-desc"> <p><p>Basic HTTP server listener options</p> </p> <p></p> </div> </td> </tr> <tr class="code-arg"> <td> <a name="ListenerOptions.prototype.port"></a> <strong class="code-arg-name"> port </strong> </td> <td class="code-arg-types"> <code>undefined | number</code> </td> <td class="code-arg-default-value"> </td> <td class="code-arg-flags"> exported optional </td> <td class="code-arg-desc"> <!-- Used for displaying comments in Class, Interface, Properties Constructor, Function and Parameters of constructor or function. (Excludes Type alias). --> <div class="code-desc"> <p><p>Basic HTTP server listener options</p> </p> <p></p> </div> </td> </tr> </table> </section> <section class="code-doc "> <a name="RequestListener"></a> <h3 class="code-ref">Type alias: RequestListener(req: <a href="#ServerRequest">ServerRequest</a>, res: <a href="#ServerResponse">ServerResponse</a>): void</h3> <div class="code-desc"> </div> <div class="code-arguments-hdr">Arguments</div> <table class="params code-arguments"> <tr> <th class="hdr-name">Name</th> <th class="hdr-type">Type</th> <th class="hdr-desc">Description</th> </tr> <tr class="code-arg"> <td> <strong class="code-arg-name">req</strong> </td> <td class="code-arg-types"> <code><a href="#ServerRequest">ServerRequest</a></code> </td> <td class="code-arg-desc"> </td> </tr> <tr class="code-arg"> <td> <strong class="code-arg-name">res</strong> </td> <td class="code-arg-types"> <code><a href="#ServerResponse">ServerResponse</a></code> </td> <td class="code-arg-desc"> </td> </tr> </table> </section> </div> <div class="intentionally-left-blank"></div> </div> </div> <script src="js/vendor/jquery-1.10.1.min.js"></script> <script src="js/vendor/jquery.scrollTo-1.4.3.1.js"></script> <script src="js/vendor/bootstrap.min.js"></script> <script src="js/main.js"></script> </body> </html>