
Product
Introducing Repository Access Permissions and Custom Roles
Socket now supports Custom Roles and Repository Access Permissions so organizations can control who can access specific repositories and actions.
@connectrpc/connect
Advanced tools
Connect is a family of libraries for building type-safe APIs with different languages and platforms. @connectrpc/connect brings them to TypeScript, web browsers, and Node.js.
With Connect, you define your schema first:
service ElizaService {
rpc Say(SayRequest) returns (SayResponse) {}
}
And with the magic of code generation, this schema produces servers and clients:
const answer = await eliza.say({ sentence: "I feel happy." });
console.log(answer);
// {sentence: 'When you feel happy, what do you do?'}
Unlike REST, the RPCs you use with Connect are typesafe end to end, but they are
regular HTTP under the hood. You can see all requests in the network inspector,
and you can curl them if you want:
curl \
--header 'Content-Type: application/json' \
--data '{"sentence": "I feel happy."}' \
https://demo.connectrpc.com/connectrpc.eliza.v1.ElizaService/Say
With Connect for ECMAScript, you can spin up a service in Node.js and call it from the web, the terminal, or native mobile clients. Under the hood, it uses Protocol Buffers for the schema, and implements RPC (remote procedure calls) with three protocols: The widely available gRPC and gRPC-web, and Connect's own protocol, optimized for the web. This gives you unparalleled interoperability with full-stack type safety.
Follow our 10-minute tutorial where we use Vite and React to create a web interface for ELIZA.
React, Svelte, Vue, Next.js and Angular are supported (see examples), and we have an expansion pack for TanStack Query. We support all modern web browsers that implement the widely available fetch API and the Encoding API.
Follow our 10-minute tutorial to spin up a service in Node.js, and call it from the web, and from a gRPC client in your terminal.
You can use vanilla Node.js, or our server plugins for Fastify
or Express. We support the builtin http, and http2
modules on Node.js v18.14.1 and later.
The 'grpc' package is a popular library for implementing gRPC (Google Remote Procedure Call) in Node.js. It provides similar functionalities to @connectrpc/connect, such as defining services, creating clients, and handling requests. However, 'grpc' is more widely adopted and has a larger community.
The 'grpc-web' package allows gRPC to be used in web applications. It provides a JavaScript client library that can communicate with gRPC services. While @connectrpc/connect focuses on general RPC connections, 'grpc-web' is specifically designed for web environments.
The 'protobufjs' package is a library for working with Protocol Buffers in JavaScript. It can be used to define and serialize messages for RPC services. While it does not provide the full RPC framework like @connectrpc/connect, it is often used in conjunction with other RPC libraries.
FAQs
Type-safe APIs with Protobuf and TypeScript.
The npm package @connectrpc/connect receives a total of 2,000,151 weekly downloads. As such, @connectrpc/connect popularity was classified as popular.
We found that @connectrpc/connect demonstrated a healthy version release cadence and project activity because the last version was released less than 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.

Product
Socket now supports Custom Roles and Repository Access Permissions so organizations can control who can access specific repositories and actions.

Product
Socket MCP now lets AI assistants review org alerts, investigate threats using the Socket threat feed, and inspect package files in addition to dependency scoring.

Product
Socket Firewall blocks malicious VS Code and Open VSX extensions before install, protecting developers from compromised editor marketplaces.