### Class: httpserver = new HttpServer()

HTTP / HTTPS server used by LoopBack's RestServer

#### constructor(requestListener: RequestListener, serverOptions: HttpServerOptions) : HttpServer

Parameters

Name | Type | Default Value | Flags | Description
--- | --- | --- | --- | ---
requestListener | `RequestListener` |  |  |
serverOptions | `HttpServerOptions` |  | optional |

#### address() : 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

#### url() : string

URL of the HTTP / HTTPS server

#### start() : Promise<void>

Starts the HTTP / HTTPS server

#### stop() : Promise<void>

Stops the HTTP / HTTPS server

### Interface: HttpOptions

HTTP server options

Properties

Name | Type | Default Value | Flags | Description
--- | --- | --- | --- | ---
protocol | `undefined |` |  | exported optional | HTTP server options

### Interface: HttpsOptions

HTTPS server options

Properties

Name | Type | Default Value | Flags | Description
--- | --- | --- | --- | ---
protocol | `` |  | exported | HTTPS server options

### Interface: ListenerOptions

Basic HTTP server listener options

Properties

Name | Type | Default Value | Flags | Description
--- | --- | --- | --- | ---
host | `undefined | string` |  | exported optional | Basic HTTP server listener options
port | `undefined | number` |  | exported optional | Basic HTTP server listener options

### Type alias: RequestListener(req: IncomingMessage, res: ServerResponse): void

Arguments

Name | Type | Description
--- | --- | ---
req | `IncomingMessage` |
res | `ServerResponse` |