UNPKG

@loopback/docs

Version:
49 lines (34 loc) 1.96 kB
--- lang: en title: 'API docs: http-server.httpserver' keywords: LoopBack 4.0, LoopBack 4 sidebar: lb4_sidebar permalink: /doc/en/lb4/apidocs.http-server.httpserver.html --- <!-- Do not edit this file. It is automatically generated by API Documenter. --> [Home](./index.md) &gt; [@loopback/http-server](./http-server.md) &gt; [HttpServer](./http-server.httpserver.md) ## HttpServer class HTTP / HTTPS server used by LoopBack's RestServer <b>Signature:</b> ```typescript export declare class HttpServer ``` ## Constructors | Constructor | Modifiers | Description | | --- | --- | --- | | [(constructor)(requestListener, serverOptions)](./http-server.httpserver.(constructor).md) | | Constructs a new instance of the <code>HttpServer</code> class | ## Properties | Property | Modifiers | Type | Description | | --- | --- | --- | --- | | [address](./http-server.httpserver.address.md) | | <code>string &#124; AddressInfo &#124; undefined</code> | Address of the HTTP / HTTPS server | | [host](./http-server.httpserver.host.md) | | <code>string &#124; undefined</code> | Host of the HTTP / HTTPS server | | [listening](./http-server.httpserver.listening.md) | | <code>boolean</code> | State of the HTTP / HTTPS server | | [port](./http-server.httpserver.port.md) | | <code>number</code> | Port number of the HTTP / HTTPS server | | [protocol](./http-server.httpserver.protocol.md) | | <code>HttpProtocol</code> | Protocol of the HTTP / HTTPS server | | [server](./http-server.httpserver.server.md) | | <code>http.Server &#124; https.Server</code> | | | [url](./http-server.httpserver.url.md) | | <code>string</code> | URL of the HTTP / HTTPS server | ## Methods | Method | Modifiers | Description | | --- | --- | --- | | [start()](./http-server.httpserver.start.md) | | Starts the HTTP / HTTPS server | | [stop()](./http-server.httpserver.stop.md) | | Stops the HTTP / HTTPS server |