# @colyseus/ws-transport

> ```typescript import { Server } from "@colyseus/core"; import { WebSocketTransport } from "@colyseus/ws-transport";

Latest version **0.18.2** (published 2026-08-26) · MIT license · 0 weekly downloads

## Install

```sh
npm install @colyseus/ws-transport
pnpm add @colyseus/ws-transport
yarn add @colyseus/ws-transport
bun add @colyseus/ws-transport
```

## Health

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

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

Warnings: low downloads; pre 1.0.

## Facts

| | |
|---|---|
| Version | 0.18.2 |
| Published | 2026-08-26 |
| First published | 2021-07-02 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Node | >= 22.x |
| Dependencies | 2 |
| Unpacked size | 86 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 7282 |
| Author | Endel Dreyer |
| Maintainers | endel |
| Keywords | colyseus, transport, websockets |

## Links

- npm: https://www.npmjs.com/package/@colyseus/ws-transport
- Repository: https://github.com/colyseus/colyseus
- Homepage: https://colyseus.io/
- Issues: https://github.com/colyseus/colyseus/issues
- npm.io page: https://npm.io/package/@colyseus/ws-transport

## Dependencies (2)

- [ws](https://npm.io/package/ws.md) ^8.19.0
- [@types/ws](https://npm.io/package/@types/ws.md) ^8.5.14

## Alternatives

- [@opentelemetry/exporter-zipkin](https://npm.io/package/@opentelemetry/exporter-zipkin.md) — 14.8M weekly downloads
- [pusher-js](https://npm.io/package/pusher-js.md) — 2.0M weekly downloads
- [browserify](https://npm.io/package/browserify.md) — 1.7M weekly downloads
- [sqs-consumer](https://npm.io/package/sqs-consumer.md) — 1.7M weekly downloads
- [@sanity/eventsource](https://npm.io/package/@sanity/eventsource.md) — 930.8K weekly downloads

## Recent versions

- 0.18.2 (latest) — 2026-08-26
- 0.18.1 (next) — 2026-07-21
- 0.16.0-preview.10 (preview) — 2024-12-20
- 0.16.0-alpha.5 (alpha) — 2024-07-04
- 0.18.0 — 2026-05-22
- 0.17.13 — 2026-04-11
- 0.17.11 — 2026-03-26
- 0.17.10 — 2026-03-26
- 0.17.9 — 2026-02-05
- 0.17.8 — 2026-01-26
- 0.17.7 — 2026-01-23
- 0.17.6 — 2026-01-09
- 0.17.5 — 2026-01-09
- 0.17.4 — 2026-01-09
- 0.17.3 — 2026-01-09
- … 39 more at https://npm.io/package/@colyseus/ws-transport/versions

## README

# @colyseus/ws-transport

```typescript
import { Server } from "@colyseus/core";
import { WebSocketTransport } from "@colyseus/ws-transport";

const gameServer = new Server({
  transport: new WebSocketTransport(),
  // ...
})
```

Re-using existing http server and/or Express:

```typescript
import http from "http";
import express from "express";
import { Server } from "@colyseus/core";
import { WebSocketTransport } from "@colyseus/ws-transport";

const app = express();
const server = http.createServer(app);

const gameServer = new Server({
  transport: new WebSocketTransport({ server }),
  // ...
})
```

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