Security News
Input Validation Vulnerabilities Dominate MITRE's 2024 CWE Top 25 List
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
@nersent/grpc-nest
Advanced tools
Type-safe thin wraper around [grpc-js](https://github.com/grpc/grpc-node) for [Nest.js](https://github.com/nestjs/nest) with support for promises.
Type-safe thin wraper around grpc-js for Nest.js with support for promises.
Note: This library is in an early development stage. Expect breaking changes.
yarn add @nersent/grpc-nest
yarn grpc-nest ./example/*.proto ./example/generated
index.ts
import { createGrpcTransport } from '@nersent/grpc-nest';
const app = await NestFactory.create(AppModule);
app.connectMicroservice<MicroserviceOptions>(
createGrpcTransport({ address: "0.0.0.0:4269" }, app),
);
await app.startAllMicroservices();
app_module.ts
import { GrpcModule } from '@nersent/grpc-nest';
@Module({
imports: [GrpcModule],
controllers: [ApiController]
})
export class AppModule {}
api_controller.ts
import {
IExampleApiService,
ExampleApiService,
} from "./generated/example_grpc_pb";
import {
ExampleApiStatusRequest,
ExampleApiStatusResponse,
} from "./generated/example_pb";
@GrpcController(ExampleApiService)
export class ApiController implements IGrpcController<IExampleApiService> {
public async status(
req: ExampleApiStatusRequest,
): Promise<ExampleApiStatusResponse> {
const name = req.getName();
const res = new ExampleApiStatusResponse();
res.setMessage(name);
return res;
}
}
Made by Nersent
FAQs
Type-safe thin wraper around [grpc-js](https://github.com/grpc/grpc-node) for [Nest.js](https://github.com/nestjs/nest) with support for promises.
The npm package @nersent/grpc-nest receives a total of 2 weekly downloads. As such, @nersent/grpc-nest popularity was classified as not popular.
We found that @nersent/grpc-nest demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 2 open source maintainers 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.
Security News
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
Security News
In this segment of the Risky Business podcast, Feross Aboukhadijeh and Patrick Gray discuss the challenges of tracking malware discovered in open source softare.
Research
Security News
A threat actor's playbook for exploiting the npm ecosystem was exposed on the dark web, detailing how to build a blockchain-powered botnet.