# async-listen

> `net.Server#listen()` helper that returns a Promise for async / await

Latest version **3.1.0** (published 2025-02-11) · MIT license · 0 weekly downloads

## Install

```sh
npm install async-listen
pnpm add async-listen
yarn add async-listen
bun add async-listen
```

## Health

**Score 45/100 (D)** — status: stable.

Positive: has types; no vulnerabilities; high quality score.

Warnings: low downloads; no esm support.

Negative: stale.

## Facts

| | |
|---|---|
| Version | 3.1.0 |
| Published | 2025-02-11 |
| First published | 2016-10-28 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | CommonJS |
| Node | >= 14 |
| Dependencies | 0 |
| Unpacked size | 11.2 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 56 |
| Maintainers | tootallnate, ethan_arrowood, vercel-release-bot |
| Keywords | async, await, es6, http, listen, net, promise, server |

## Links

- npm: https://www.npmjs.com/package/async-listen
- Repository: https://github.com/vercel/async-listen
- Homepage: https://github.com/vercel/async-listen#readme
- Issues: https://github.com/vercel/async-listen/issues
- npm.io page: https://npm.io/package/async-listen

## Alternatives

- [@commercetools/sync-actions](https://npm.io/package/@commercetools/sync-actions.md) — 25.1K weekly downloads
- [cwait](https://npm.io/package/cwait.md) — 21.4K weekly downloads
- [@ledgerhq/hw-app-cosmos](https://npm.io/package/@ledgerhq/hw-app-cosmos.md) — 4.2K weekly downloads
- [@financial-times/o-loading](https://npm.io/package/@financial-times/o-loading.md) — 2.8K weekly downloads
- [fa](https://npm.io/package/fa.md) — 185 weekly downloads

## Recent versions

- 3.1.0 (latest) — 2025-02-11
- 3.0.1 — 2023-07-18
- 3.0.0 — 2023-05-05
- 2.1.0 — 2023-04-24
- 2.0.3 — 2023-03-28
- 2.0.2 — 2022-02-28
- 2.0.1 — 2022-02-28
- 1.2.0 — 2019-03-28
- 1.1.1 — 2019-02-08
- 1.1.0 — 2019-02-07
- 1.0.0 — 2016-10-28

## README

# async-listen

Promisify `server.listen` for your HTTP/HTTPS/TCP server.

## Install

```sh
npm install async-listen
```

## Usage

```typescript
import listen from 'async-listen';
import { createServer } from 'http';

async function main() {
	const port = 3000;
	const server = createServer();
	const address = await listen(server, port);
	console.log(address); // => URL('http://127.0.0.1:3000')
}

main().catch(console.error);
```

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