Runtime Modes
Use the same Oweb API in both modes.
Default mode (Fastify runtime)
Section titled “Default mode (Fastify runtime)”import Oweb from 'owebjs';
const app = await new Oweb().setup();High-performance mode (uWebSockets runtime)
Section titled “High-performance mode (uWebSockets runtime)”import Oweb from 'owebjs';
const app = await new Oweb({ uWebSocketsEnabled: true }).setup();When to prefer uWebSocketsEnabled: true:
- very high connection count
- aggressive WebSocket usage
- throughput-focused deployments