
Product
Introducing Rust Support in Socket
Socket now supports Rust and Cargo, offering package search for all users and experimental SBOM generation for enterprise projects.
A client to call gRPC server methods on the fly. 一个 gRPC 客户端,可以灵活地调用 gRPC 服务。
A client to call gRPC server methods on the fly.
The name is inspired by
post-man
.
This package provides a lightweight gRPC client implementation, which can be used to verify your gRPC service is working as expected or not.
I am using it heavily for testing code, and recommend you to use it too.
# Globally
npm install -g grpc-man
# Only in project and for testing purpose
npm install --save-dev grpc-man
javascript
projectimport GrpcClient from 'grpc-man/lib/Client';
async function main() {
const client = new GrpcClient('<yourhost>:<your port>', __dirname + 'your.proto');
await client.grpc.youpackage.YourService.yourMethod(arg);
}
If your project provides services through gRPC, then you can use grpc-man
to do the automatic testing against your gRPC services.
The proto file used for testing is here。
import assert = require('assert');
import GrpcClient from 'grpc-man/lib/Client';
describe('grpc', () => {
it('greets', async () => {
const client = new Client('0.0.0.0:8890', __dirname + '/./proto/helloworld.proto');
const res = await client.grpc.helloworld.Greeter.sayHello({ name: 'name' });
assert.deepEqual(res, { message: 'Hello name' });
});
});
If you are using jest
testing framework, then you can refer to the testing code for this package itself。
grpc-man <endpoint> <protoFilePath>
# for example:
grpc-man localhost:8080 /path/to/proto_file
npm start <endpoint> <protoFilePath>
# for example:
npm start localhost:8080 /path/to/proto_file
npm run client
FAQs
A client to call gRPC server methods on the fly. 一个 gRPC 客户端,可以灵活地调用 gRPC 服务。
The npm package grpc-man receives a total of 4 weekly downloads. As such, grpc-man popularity was classified as not popular.
We found that grpc-man demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Product
Socket now supports Rust and Cargo, offering package search for all users and experimental SBOM generation for enterprise projects.
Product
Socket’s precomputed reachability slashes false positives by flagging up to 80% of vulnerabilities as irrelevant, with no setup and instant results.
Product
Socket is launching experimental protection for Chrome extensions, scanning for malware and risky permissions to prevent silent supply chain attacks.