Questions tagged [nestjs-gateways]
42 questions
0
votes
0 answers
How to get socket io error message from react?
My question is about socket io using nestjs and react. Here I am using nestjs for backend implementation and react for frontend implementation.
In Backend-
I use nestjs webscoket with validation pipe. I also create a simple SubscribeMessage like…

Md Ali
- 217
- 1
- 2
- 10
0
votes
0 answers
Is there a way to support all paths in a Nestjs Gateway using the ws module?
I want my Gateway to be able to receive connections from any path as I'm going to receive user id as parameter. I'm using the ws module.
Example:
ws://localhost:3000/12345
another example:
ws://localhost:3000/54321
I put @WebSocketGateway({ path:…

Yael Badillo
- 3
- 2
0
votes
0 answers
NestJS API gateway sending message to Kafka
I was doing some POCs and working on trying to have a basic thing working but I hit a wall really fast, I created a docker container with Kafka and zookeeper using the bitnami images, they are up right now and working. Then I went and created a…

V. Benavides
- 533
- 1
- 7
- 21
0
votes
0 answers
socketio-jwt error in building typescript when importing library [Cannot find namespace 'SocketIO'.]
hello guys I am working on a nestjs@v9 that has a chat functionality and I want to be able to authorize the tokens sent by the user while creating the websocket
the app has a build script "build":"npm run remove-build && tsc -p…

Mohammed Ibrahim
- 101
- 7
0
votes
1 answer
what is the proper way to connect to a WebSocketGateway server in Nestjs production mode?
my nestjs WebSocketGateway server is working perfectly in dev mode but in production mode i can see those clients that trying to connect but the server raise the followed exception 2022-02-08T08:33:33.901Z undefined ERROR No exports found in…

Prince D.Taylor
- 47
- 1
- 10
0
votes
1 answer
NestJs socket authentication, emit event in handleConnection
Upon failed authentication, before disconnecting, I want to emit an event to the client informing that the token provided with the request is invalid. In my WebSocketGateway this is my code:
handleConnection(client: Socket, ...args: any[]) {
…

user3353167
- 782
- 2
- 16
- 31
0
votes
1 answer
How to generate migration file in typeorm using nest js
I am new this framework Nest JS and created sample Restful API but could not migrate the entity file. I tried many ways it's not working. first time run migration command to generate migration file it's working fine. but second time creating a new…

Hariprasath Vengatachalam
- 155
- 6
- 18
0
votes
2 answers
How to setup different environment file in nest js using postgresql
I am new this framework. I connected PostgreSQL database using ormconfig file. but I need to configure development environment, production environment, test environment. How to achieve this scenarios. I tried to use config service in my project. but…

hari prasanth
- 716
- 1
- 15
- 35
0
votes
2 answers
It is possible to use socket.io and ws together?
I have a NestJS microservice using socket.io, but I need to know if it's possible to implement it in the same gateway WebSockets (WS). I need to send some requests at the same namespace from different clients (socket.io and ws). The actual…

No-name
- 3
- 3
0
votes
1 answer
how to customise error message in post request?
I am using nest js for making Restfull Api . I am also using class-validator ,and class-transform to validate my request ot DTO. Currently It is showing this error
{"statusCode":400,"message":["username should not be empty","description should not…

user944513
- 12,247
- 49
- 168
- 318
0
votes
0 answers
Nest.js equivalent program for below Node snippet
Can someone please help and tell me how I can write the following code snippet which is written as a node application to write as a nest application with just WebSockets and gateway class?
var webSocketsServerPort = 8080;
var webSocketServer…

Hans123
- 33
- 1
- 5
0
votes
1 answer
Nestjs - @nestjs/graphql GraphQLGatewayModule always returns Bad Request
I'm trying to use the GraphQLGatewayModule module from @nestjs/graphql.
To test, i'm using an GraphQL API free: https://anilist.co/graphiql
But i always get HTTP 400 status.
My code:
import { Module } from '@nestjs/common';
import {…

Gabriel
- 133
- 1
- 6