Socket
Book a DemoInstallSign in
Socket

@proton/nestjs-uws

Package Overview
Dependencies
Maintainers
3
Versions
23
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@proton/nestjs-uws

NestJS UWebSocket.js adapter

latest
npmnpm
Version
1.3.23
Version published
Weekly downloads
2
-33.33%
Maintainers
3
Weekly downloads
 
Created
Source

Nest Logo Nest Logo

NestJS uWebSocket.js gateway adapter

Installation

npm i nestjs-uws

Usage

import { UWebSocketAdapter } from 'nestjs-uws';

const app = await NestFactory.create(ApplicationModule);
app.useWebSocketAdapter(new UWebSocketAdapter({
  port: 8099,
}));

You can't create SSL secure APP for now. You will need to use reverse-proxy to hide the websocket server behind.

Options

UWS Adapter options

NameType
portnumber

Packet structure

To use the NestJS WebSocket gateway decorators you should implement the base packet structure and send any messages from the client using the next structure

{
    "event": String,
    "data": any
}

Keywords

nestjs

FAQs

Package last updated on 05 Aug 2022

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts