# @loopback/http-server

> A wrapper for creating HTTP/HTTPS servers

Latest version **7.0.15** (published 2026-08-18) · MIT license · 0 weekly downloads

## Install

```sh
npm install @loopback/http-server
pnpm add @loopback/http-server
yarn add @loopback/http-server
bun add @loopback/http-server
```

## Health

**Score 65/100 (B)** — status: active.

Positive: has types; no vulnerabilities; recently updated; high maintenance score; high quality score.

Warnings: low downloads; no esm support.

## Facts

| | |
|---|---|
| Version | 7.0.15 |
| Published | 2026-08-18 |
| First published | 2018-06-08 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | CommonJS |
| Node | 20 \|\| 22 \|\| 24 |
| Dependencies | 3 |
| Unpacked size | 26 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 5106 |
| Author | IBM Corp. and LoopBack contributors |
| Maintainers | rfeng, rmg, dhmlau, theprez, frbuceta, marioestradarosa, achrinza |

## Links

- npm: https://www.npmjs.com/package/@loopback/http-server
- Repository: https://github.com/loopbackio/loopback-next
- Homepage: https://github.com/loopbackio/loopback-next#readme
- Issues: https://github.com/loopbackio/loopback-next/issues
- npm.io page: https://npm.io/package/@loopback/http-server

## Dependencies (3)

- [debug](https://npm.io/package/debug.md) ^4.4.3
- [tslib](https://npm.io/package/tslib.md) ^2.8.1
- [stoppable](https://npm.io/package/stoppable.md) ^1.1.0

## Recent versions

- 7.0.15 (latest) — 2026-08-18
- 0.3.0 (dp3) — 2018-07-20
- 7.0.14 — 2026-07-16
- 7.0.13 — 2026-06-11
- 7.0.12 — 2026-05-12
- 7.0.11 — 2026-04-14
- 7.0.10 — 2026-03-11
- 7.0.9 — 2026-02-10
- 7.0.8 — 2026-01-12
- 7.0.7 — 2025-12-09
- 7.0.6 — 2025-11-11
- 7.0.5 — 2025-10-15
- 7.0.4 — 2025-09-10
- 7.0.3 — 2025-08-11
- 7.0.2 — 2025-07-15
- … 154 more at https://npm.io/package/@loopback/http-server/versions

## README

# @loopback/http-server

This package implements the HTTP / HTTPS server endpoint for LoopBack 4 apps.

## Overview

This is an internal package used by LoopBack 4 for creating HTTP / HTTPS server.

## Installation

To use this package, you'll need to install `@loopback/http-server`.

```sh
npm i @loopback/http-server
```

## Usage

`@loopback/http-server` should be instantiated with a request handler function,
and an HTTP / HTTPS options object.

```js
const httpServer = new HttpServer(
  (req, res) => {
    res.end('Hello world');
  },
  {port: 3000, host: ''},
);
```

Instance methods of `HttpServer`.

| Method    | Description       |
| --------- | ----------------- |
| `start()` | Starts the server |
| `stop()`  | Stops the server  |

Instance properties of `HttpServer`.

| Property   | Description            |
| ---------- | ---------------------- |
| `address`  | Address details        |
| `host`     | host of the server     |
| `port`     | port of the server     |
| `protocol` | protocol of the server |
| `url`      | url the server         |

## Contributions

- [Guidelines](https://github.com/loopbackio/loopback-next/wiki/Contributing#guidelines)
- [Join the team](https://github.com/loopbackio/loopback-next/issues/110)

## Tests

Run `npm test` from the root folder.

## Contributors

See
[all contributors](https://github.com/loopbackio/loopback-next/graphs/contributors).

## License

MIT

---
_Source: https://npm.io/package/@loopback/http-server · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
