Registry / devops / firecomm

firecomm

JSON →
library2.0.5jsnpmunverified

Firecomm is a feature-rich gRPC framework for Node.js (v2.0.5) that simplifies building gRPC servers and clients. It wraps @grpc/grpc-js and @grpc/proto-loader, offering a unified API with chainable RPC calls, client/server event listeners, Express-like middleware, client interceptors, and access to all 74 gRPC channel configurations. Key differentiators include idempotent, cacheable, corked, and waitForReady requests, granular error handling, and first-class support for bidirectional streaming and protobuf packaging. Active development with frequent releases.

npm install firecomm
INSTALL
IMPORT
SIG · FIRECOMM
F
firecomm
devopsjavascriptv2.0.5
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

Server
import { Server } from 'firecomm'
const { Server } = require('firecomm')
Firecomm v2 supports both ESM and CJS; ESM import is preferred for tree-shaking.
build
import { build } from 'firecomm'
import build from 'firecomm'
build is a named export, not a default export.
Client
import { Client } from 'firecomm'
Client is used to create client stubs from a built package.

Creates a gRPC server and client from a .proto file, demonstrating bidirectional streaming with the ChattyMath service.

import { build, Server, Client } from 'firecomm'; import path from 'path'; const PROTO_PATH = path.join(process.cwd(), 'example.proto'); const pkg = build(PROTO_PATH, { keepCase: true, longs: Number }); const server = new Server(); server.addService(pkg.exampleAPI.ChattyMath.service, { BidiMath: (bidi) => { bidi.on('data', (msg) => { console.log('Received:', msg); bidi.write({ requests: 1, responses: 1 }); }); bidi.on('end', () => bidi.end()); } }); const serverCredentials = require('@grpc/grpc-js').ServerCredentials.createInsecure(); server.bindAsync('0.0.0.0:50051', serverCredentials, (err, port) => { if (err) throw err; server.start(); console.log(`Server running on port ${port}`); const client = new Client(pkg.exampleAPI.ChattyMath, 'localhost:50051'); const call = client.BidiMath(); call.write({ requests: 1, responses: 0 }); call.on('data', (msg) => console.log('Client received:', msg)); call.on('end', () => { client.close(); server.forceShutdown(); }); setTimeout(() => call.end(), 1000); });
Debug
Known issues
breakingFirecomm v2 requires @grpc/grpc-js >=1.8.0; compatibility with older versions is not guaranteed.
fix
Update @grpc/grpc-js to ^1.8.0 in package.json.
affects: >=2.0.0
breakingThe 'corked' and 'waitForReady' options no longer accept boolean; they require an object with specific properties.
fix
Use { corked: true } or { waitForReady: true } instead of just true.
affects: >=2.0.0
deprecatedThe 'use' method for middleware is deprecated in v2; use 'intercept' instead.
fix
Replace server.use(middleware) with server.intercept(middleware).
affects: >=2.0.0 <2.0.5
gotchabuild() returns a different object shape than protobufjs; service definitions are under pkg.<package>.<Service>, not pkg.<Service>.
fix
Access service via pkg[packageName][serviceName].
affects: >=2.0.0
gotchaClient constructor expects the service definition (not the package) as first argument; passing the whole package fails silently.
fix
Instantiate Client with pkg.myPackage.MyService, not pkg.
affects: >=2.0.0
Errors
Common errors & fixes
Error: Cannot find module '@grpc/grpc-js'
Missing peer dependency @grpc/grpc-js.
fix
Run 'npm install @grpc/grpc-js'
TypeError: pkg.exampleAPI.ChattyMath.service is undefined
Package object does not contain expected service structure.
fix
Ensure build() config includes keepCase:true or use correct casing. If .proto package is 'exampleAPI', access pkg.exampleAPI.ChattyMath.
Error: 12 UNIMPLEMENTED: Method not found: /exampleAPI.ChattyMath/BidiMath
Server not registered with matching service handler.
fix
Verify server.addService() is called with the correct service definition from the built package.
Upgrade
Version history
2.0.5latest on npm
Audit
Dependencies
@grpc/grpc-jsrequiredCore gRPC library for Node.js; Firecomm wraps its Server and Client classes.
@grpc/proto-loaderrequiredUsed by Firecomm's build() function to load .proto files and generate service definitions.
protobufjsrequiredUnderlying protobuf library used by @grpc/proto-loader for message serialization.
Agent activity
2 hits · last 30 days
node
2
Resources
firecomm — npm install firecomm · libregistry