@opra/socketio
v1.28.5
Published
Opra Socket.IO adapter
Readme
@opra/socketio
Standalone Socket.IO transport adapter for the OPRA framework
🌐 Documentation · 🚀 Getting Started · 📦 Packages · 💬 Issues
Standalone Socket.IO transport adapter for the OPRA framework. Bring real-time WebSocket operations into the same schema-driven model as your HTTP API.
Features
SocketioAdapter— Platform adapter managing the Socket.IO server and event routingSocketioContext— Per-event context with typed access to socket instance, event name, and parameters- Unified operation model across HTTP and WebSocket transports
- Interceptor and validation pipeline support
Installation
npm install @opra/socketioUsage
import { SocketioAdapter } from '@opra/socketio';
import { Server } from 'socket.io';
const io = new Server(httpServer);
const adapter = new SocketioAdapter(apiDocument, { server: io });
await adapter.initialize();For NestJS integration use
@opra/nestjs-socketio.
Node Compatibility
- node >= 20.x
License
Available under MIT license.
