vue.jsnuxt.jsgrpc-node

Is there a possibility to use gRPC in Nuxt.js?


Im using Nuxt.js to build a frontend for some data I pull from a REST API. Now I need to call functions on a remote service, ideally via gRPC since the service has a endpoint for that.

I searched the web but I guess Im misunderstanding the whole process of creating a frontend with nuxt, since I cant find any information on that topic.

How can I, for example embed the solution provided here: https://github.com/grpc/grpc-node into my frontend?


Solution

  • nuxt is frontend. and the lib you are linked for backend. Nuxt dont care how you get your date, e.g. grpc or rest or anything. You need to use grpc javacsript client that work in browser e.g. https://github.com/grpc/grpc-web