---
lang: en
title: 'API docs: http-server.httpserver.(constructor)'
keywords: LoopBack 4.0, LoopBack 4
sidebar: lb4_sidebar
permalink: /doc/en/lb4/apidocs.http-server.httpserver.(constructor).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) &gt; [(constructor)](./http-server.httpserver.(constructor).md)

## HttpServer.(constructor)

Constructs a new instance of the `HttpServer` class

<b>Signature:</b>

```typescript
constructor(requestListener: RequestListener, serverOptions?: HttpServerOptions);
```

## Parameters

|  Parameter | Type | Description |
|  --- | --- | --- |
|  requestListener | <code>RequestListener</code> |  |
|  serverOptions | <code>HttpServerOptions</code> |  |


