@opra/nestjs-socketio
v1.28.5
Published
Opra NestJS Socket.io Module
Readme
@opra/nestjs-socketio
NestJS Socket.IO module for the OPRA framework
🌐 Documentation · 🚀 Getting Started · 📦 Packages · 💬 Issues
NestJS Socket.IO module for the OPRA framework. Add real-time WebSocket operations to your NestJS application using the same OPRA schema you use for HTTP.
Features
OpraSocketioModule— Dynamically configurable NestJS module (forRoot/forRootAsync)- Configurable Socket.IO server options (port, CORS, etc.)
- Full NestJS dependency injection and provider support
- Interceptor middleware pipeline
- Unified operation model shared with HTTP endpoints
Installation
npm install @opra/nestjs-socketioUsage
import { Module } from '@nestjs/common';
import { OpraSocketioModule } from '@opra/nestjs-socketio';
@Module({
imports: [
OpraSocketioModule.forRoot({
name: 'MyWSAPI',
port: 3001,
serverOptions: { cors: { origin: '*' } },
controllers: [NotificationsController],
providers: [NotificationsService],
}),
],
})
export class AppModule {}Node Compatibility
- node >= 20.x
License
Available under MIT license.
