---
lang: en
title: 'API docs: http-server.httpserver._constructor_'
keywords: LoopBack 4.0, LoopBack 4, Node.js, TypeScript, OpenAPI
sidebar: lb4_sidebar
editurl: https://github.com/loopbackio/loopback-next/tree/master/packages/http-server
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

**Signature:**

```typescript
constructor(requestListener: RequestListener, serverOptions?: HttpServerOptions);
```

## Parameters

|  Parameter | Type | Description |
|  --- | --- | --- |
|  requestListener | [RequestListener](./http-server.requestlistener.md) |  |
|  serverOptions | [HttpServerOptions](./http-server.httpserveroptions.md) | _(Optional)_ |


