Page Contents
Home > @loopback/http-server > HttpServer
HttpServer class
HTTP / HTTPS server used by LoopBack’s RestServer
Signature:
export declare class HttpServer
Constructors
| Constructor | Modifiers | Description |
|---|---|---|
| (constructor)(requestListener, serverOptions) | Constructs a new instance of the HttpServer class |
Properties
| Property | Modifiers | Type | Description |
|---|---|---|---|
| address | string | AddressInfo | undefined | Address of the HTTP / HTTPS server | |
| host | string | undefined | Host of the HTTP / HTTPS server | |
| listening | boolean | State of the HTTP / HTTPS server | |
| port | number | Port number of the HTTP / HTTPS server | |
| protocol | HttpProtocol | Protocol of the HTTP / HTTPS server | |
| server | http.Server | https.Server | ||
| serverOptions | HttpServerOptions | ||
| url | string | URL of the HTTP / HTTPS server |
Methods
| Method | Modifiers | Description |
|---|---|---|
| start() | Starts the HTTP / HTTPS server | |
| stop() | Stops the HTTP / HTTPS server |