
Security News
Deno 2.2 Improves Dependency Management and Expands Node.js Compatibility
Deno 2.2 enhances Node.js compatibility, improves dependency management, adds OpenTelemetry support, and expands linting and task automation for developers.
@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.
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
Deno 2.2 enhances Node.js compatibility, improves dependency management, adds OpenTelemetry support, and expands linting and task automation for developers.
Security News
React's CRA deprecation announcement sparked community criticism over framework recommendations, leading to quick updates acknowledging build tools like Vite as valid alternatives.
Security News
Ransomware payment rates hit an all-time low in 2024 as law enforcement crackdowns, stronger defenses, and shifting policies make attacks riskier and less profitable.