@mirabo_colyseus/ws-transport
TypeScript icon, indicating that this package has built-in type declarations

0.14.23 • Public • Published

@mirabo_colyseus/ws-transport

import { Server } from "@mirabo_colyseus/core";
import { WebSocketTransport } from "@mirabo_colyseus/ws-transport";

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

Re-using existing http server and/or Express:

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

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

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

Package Sidebar

Install

npm i @mirabo_colyseus/ws-transport

Homepage

colyseus.io/

Weekly Downloads

7

Version

0.14.23

License

MIT

Unpacked Size

44.4 kB

Total Files

18

Last publish

Collaborators

  • mirabo_phuclm