@nestjs/websockets
Version:
Nest - modern, fast, powerful node.js web framework (@websockets)
13 lines (12 loc) • 361 B
JavaScript
import { GATEWAY_SERVER_METADATA } from '../constants.js';
/**
* Attaches native Web Socket Server to a given property.
*
* @publicApi
*/
export const WebSocketServer = () => {
return (target, propertyKey) => {
Reflect.set(target, propertyKey, null);
Reflect.defineMetadata(GATEWAY_SERVER_METADATA, true, target, propertyKey);
};
};