grpc-web-middleware v0.2.3 is a lightweight Node.js middleware that acts as a gRPC-Web gateway, enabling gRPC-Web clients to communicate with gRPC servers via HTTP/1.1. It is designed for simplicity and minimal configuration, integrating easily with Express and Koa. The package has not been updated since 2019 and lacks TypeScript definitions, but remains functional for basic gRPC-Web proxying. It differs from alternatives like grpc-web by focusing on server-side middleware rather than client-side libraries.
npm install grpc-web-middlewareNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Create an Express server with CORS that proxies gRPC-Web requests to a gRPC server at localhost:6565.
Add cors() or @koa/cors before the gRPC middleware.
Use async (ctx, next) => grpcWebMiddleware(url)(ctx.req, ctx.res, next).
Use prefix like '/api' (not '/api/' or 'api').
Run 'npm install grpc-web-middleware' in your project.
Use 'const grpcWebMiddleware = require('grpc-web-middleware')' (no destructuring).Use dynamic import or createRequire from 'module'.
No dependency data recorded yet.