### Class: httpserver = new HttpServer()

HTTP / HTTPS server used by LoopBack's RestServer

#### constructor(httpRequestListener: HttpRequestListener, httpServerOptions: HttpServerOptions) : HttpServer

Parameters

Name | Type | Default Value | Flags | Description
--- | --- | --- | --- | ---
httpRequestListener | `HttpRequestListener` |  |  |
httpServerOptions | `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

### Type alias: HttpRequestListener(req: ServerRequest, res: ServerResponse): void

Arguments

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