---
lang: en
title: 'API docs: http-server.httpserver'
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.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)

## HttpServer class

HTTP / HTTPS server used by LoopBack's RestServer

<b>Signature:</b>

```typescript
export declare class HttpServer 
```

## Constructors

|  Constructor | Modifiers | Description |
|  --- | --- | --- |
|  [(constructor)(requestListener, serverOptions)](./http-server.httpserver._constructor_.md) |  | Constructs a new instance of the <code>HttpServer</code> class |

## Properties

|  Property | Modifiers | Type | Description |
|  --- | --- | --- | --- |
|  [address](./http-server.httpserver.address.md) |  | string \| AddressInfo \| undefined | Address of the HTTP / HTTPS server |
|  [host](./http-server.httpserver.host.md) |  | string \| undefined | Host of the HTTP / HTTPS server |
|  [listening](./http-server.httpserver.listening.md) |  | boolean | State of the HTTP / HTTPS server |
|  [port](./http-server.httpserver.port.md) |  | number | Port number of the HTTP / HTTPS server |
|  [protocol](./http-server.httpserver.protocol.md) |  | [HttpProtocol](./http-server.httpprotocol.md) | Protocol of the HTTP / HTTPS server |
|  [server](./http-server.httpserver.server.md) |  | http.Server \| https.Server |  |
|  [serverOptions](./http-server.httpserver.serveroptions.md) |  | [HttpServerOptions](./http-server.httpserveroptions.md) |  |
|  [url](./http-server.httpserver.url.md) |  | string | URL of the HTTP / HTTPS server |

## Methods

|  Method | Modifiers | Description |
|  --- | --- | --- |
|  [start()](./http-server.httpserver.start.md) |  | Starts the HTTP / HTTPS server |
|  [stop()](./http-server.httpserver.stop.md) |  | Stops the HTTP / HTTPS server |


