Registry / devops / fpm-plugin-grpc

fpm-plugin-grpc

JSON →
library2.0.0jsnpmunverified

A plugin for YF-FPM-SERVER that enables gRPC client invocations. Version 2.0.0 supports Node.js >=8.11.1, with a configuration-driven design for defining proto directories and service endpoints. It integrates into the YF-FPM server ecosystem, differentiating with its plugin architecture and minimal API surface. Release cadence is unspecified.

npm install fpm-plugin-grpc
INSTALL
IMPORT
SIG · FPM-PLUGIN-GRPC
F
fpm-plugin-grpc
devopsjavascriptv2.0.0
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.

default
import fpmPluginGrpc from 'fpm-plugin-grpc'
const fpmPluginGrpc = require('fpm-plugin-grpc')
Package is ESM-first; require() may fail in Node >=12 with type:module
config
import { config } from 'fpm-plugin-grpc'
import { configuration } from 'fpm-plugin-grpc'
Named export is 'config', not 'configuration'
subscribe
import { subscribe } from 'fpm-plugin-grpc'
subscribe is a named export used to register the plugin with YF-FPM-SERVER

Shows how to instantiate the gRPC plugin with config and start the YF-FPM server.

import Server from 'yf-fpm-server'; import fpmPluginGrpc from 'fpm-plugin-grpc'; const server = new Server({ plugins: [ fpmPluginGrpc({ proto_dir: '/absolute/path/to/protos', protos: [ { name: 'foo', endpoint: 'localhost:50093', }, ], }), ], }); server.start();
Debug
Known issues
breakingNode.js <8.11.1 is not supported
fix
Upgrade Node.js to >=8.11.1
affects: >=2.0.0
gotchaproto_dir must be an absolute path; relative paths cause runtime errors
fix
Use path.resolve() to convert relative paths to absolute
affects: >=1.0.0
gotchaThe 'endpoint' field does not support TLS/SSL; only plaintext gRPC is allowed
fix
Use a proxy or configure TLS at the application level if needed
affects: >=1.0.0
Errors
Common errors & fixes
Error: ENOENT: no such file or directory, open '...'
proto_dir path is incorrect or relative
fix
Provide an absolute path to proto_dir
TypeError: fpmPluginGrpc is not a function
Default import from CommonJS require() in ESM environment
fix
Use import fpmPluginGrpc from 'fpm-plugin-grpc' instead of require()
Upgrade
Version history
2.0.0latest on npm
Audit
Dependencies
yf-fpm-serverrequiredpeer dependency: this plugin extends YF-FPM-SERVER and cannot function without it
grpcrequiredruntime dependency for gRPC client functionality
Agent activity
2 hits · last 30 days
node
2
Resources
fpm-plugin-grpc — npm install fpm-plugin-grpc · libregistry