Ravex

Quick Start

Attach ChatEngine to a plain Node.js HTTP server.

Quick Start

The fastest way to get a ravex server running.

import { createServer } from "http";
import { ChatEngine } from "@ravex/server";

const httpServer = createServer();

const engine = new ChatEngine(httpServer, {
  // CORS for Socket.IO
  socket: {
    cors: { origin: "*" },
  },
  // Optional: customize messaging behavior
  message: {
    allowEdits: true,
    allowDeletes: true,
    maxMessageLength: 5000,
  },
  // Rate limiting
  rateLimit: {
    maxMessages: 60,
    windowMs: 60000,
  },
});

httpServer.listen(3000, () => {
  console.log("Ravex chat server running on port 3000");
});

What You Get

  • Real-time messaging with acknowledgments
  • Automatic presence tracking
  • Typing indicators
  • Rate limiting out of the box
  • Full type safety on both ends

Next Steps

On this page