robertmain
robertmain

Reputation: 419

Nest.JS JSON RPC Support

I'm looking into using Nest.JS for a project, but a key requirement for my project means I have to provide a JSON-RPC API as well as the usual HTTP/Socket.io API.

Wondered if that was supported. Apparently this is the best place to ask.

Upvotes: 1

Views: 4019

Answers (2)

han4wluc
han4wluc

Reputation: 1199

There seems to be a nestjs JSON-RPC implementation now https://github.com/Insidexa/nestjs-rpc

Upvotes: 2

cojack
cojack

Reputation: 2620

Nest does support gRPC out of the box, you can read about it here https://docs.nestjs.com/microservices/grpc but not JSON-RPC, and Im not sure if this is exposed, so basically answering to your first part of question: Nope, there is no support for JSON-RPC in nest out of the box. But the second one, the answer is: yes, you can map your controller methods to the socket/http request.

Upvotes: 2

Related Questions