{"id":13581488,"url":"https://github.com/connectrpc/connect-es","last_synced_at":"2026-05-30T11:03:00.741Z","repository":{"id":51737943,"uuid":"460076976","full_name":"connectrpc/connect-es","owner":"connectrpc","description":"The TypeScript implementation of Connect: Protobuf RPC that works.","archived":false,"fork":false,"pushed_at":"2026-05-20T14:37:28.000Z","size":10177,"stargazers_count":1745,"open_issues_count":52,"forks_count":117,"subscribers_count":14,"default_branch":"main","last_synced_at":"2026-05-20T19:28:02.454Z","etag":null,"topics":["connectrpc","express","fastify-plugin","grpc","grpc-web","javascript","nextjs","nodejs","protobuf","protoc-plugin","rpc","schema","typescript"],"latest_commit_sha":null,"homepage":"https://connectrpc.com","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/connectrpc.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":".github/CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":".github/CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":"MAINTAINERS.md","copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2022-02-16T16:05:30.000Z","updated_at":"2026-05-20T14:49:50.000Z","dependencies_parsed_at":"2023-10-11T11:56:55.512Z","dependency_job_id":"3eb9aaa3-1c17-49eb-8d7f-286fac88ea2a","html_url":"https://github.com/connectrpc/connect-es","commit_stats":{"total_commits":710,"total_committers":33,"mean_commits":"21.515151515151516","dds":0.552112676056338,"last_synced_commit":"b735d791226382ff959d55c5e82d7e8befbf0dd7"},"previous_names":["bufbuild/connect-web","bufbuild/connect-es"],"tags_count":59,"template":false,"template_full_name":null,"purl":"pkg:github/connectrpc/connect-es","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/connectrpc%2Fconnect-es","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/connectrpc%2Fconnect-es/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/connectrpc%2Fconnect-es/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/connectrpc%2Fconnect-es/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/connectrpc","download_url":"https://codeload.github.com/connectrpc/connect-es/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/connectrpc%2Fconnect-es/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33689564,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-05-30T02:00:06.278Z","response_time":92,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["connectrpc","express","fastify-plugin","grpc","grpc-web","javascript","nextjs","nodejs","protobuf","protoc-plugin","rpc","schema","typescript"],"created_at":"2024-08-01T15:02:03.308Z","updated_at":"2026-05-30T11:03:00.717Z","avatar_url":"https://github.com/connectrpc.png","language":"TypeScript","funding_links":[],"categories":["typescript","TypeScript","TypeScript and JavaScript"],"sub_categories":[],"readme":"\u003cimg src=\".github/connect-logo.png\" width=\"15%\" /\u003e\n\n# Connect for ECMAScript\n\n[![License](https://img.shields.io/github/license/connectrpc/connect-es?color=blue)](./LICENSE) [![Build](https://github.com/connectrpc/connect-es/actions/workflows/ci.yaml/badge.svg?branch=main)](https://github.com/connectrpc/connect-es/actions/workflows/ci.yaml) [![NPM Version](https://img.shields.io/npm/v/@connectrpc/connect/latest?color=green\u0026label=%40connectrpc%2Fconnect)](https://www.npmjs.com/package/@connectrpc/connect)\n\nConnect is a family of libraries for building type-safe APIs with different languages and platforms.\n[@connectrpc/connect](https://www.npmjs.com/package/@connectrpc/connect) brings them to TypeScript,\nweb browsers, and Node.js.\n\n## A small example\n\nWith Connect, we define our schema first:\n\n```proto\nservice ElizaService {\n  rpc Say(SayRequest) returns (SayResponse) {}\n}\n```\n\nAnd with the magic of code generation, we can implement and serve our service:\n\n```ts\nimport * as http from \"node:http\";\nimport type { ConnectRouter } from \"@connectrpc/connect\";\nimport { connectNodeAdapter } from \"@connectrpc/connect-node\";\nimport { createValidateInterceptor } from \"@connectrpc/validate\";\nimport type { SayRequest } from \"./gen/eliza_pb.js\";\nimport { ElizaService } from \"./gen/eliza_pb.js\";\n\n// The adapter turns our RPC routes into a Node.js request handler.\nconst handler = connectNodeAdapter({\n  // Validation via Protovalidate is almost always recommended\n  interceptors: [createValidateInterceptor()],\n  routes: (router: ConnectRouter) =\u003e {\n    router.service(ElizaService, {\n      say(req: SayRequest) {\n        return {\n          sentence: `You said \"${req.sentence}\"`,\n        };\n      },\n    });\n  },\n});\n\nhttp.createServer(handler).listen(8080)\n```\n\nCalling an RPC is just as simple. You create a client with your server's URL and call a method:\n\n```ts\nimport { createClient } from \"@connectrpc/connect\";\nimport { createConnectTransport } from \"@connectrpc/connect-node\";\nimport { ElizaService } from \"./gen/eliza_pb.js\";\n\nconst client = createClient(\n  ElizaService,\n  createConnectTransport({\n    httpVersion: \"1.1\",\n    baseUrl: \"http://localhost:8080\",\n  })\n);\n\ntry {\n  const res = await client.say({sentence: \"Hello, world!\"})\n  console.log(res.sentence)\n} catch (err) {\n  console.error(err);\n}\n```\n\nOf course, a plain HTTP server isn't fit for production use! See\nConnect's [server plugins](https://connectrpc.com/docs/node/server-plugins)\nfor a guide to production deployment with Fastify, Next.js, Express, and more.\n\n## Simple, cURL-friendly RPC protocol\n\nUnlike REST, the Remote Procedure Calls are type-safe, but they are regular HTTP\nunder the hood. You can see all requests in the network inspector, and you\ncan `curl` them if you want:\n\n```shell\ncurl \\\n    --header 'Content-Type: application/json' \\\n    --data '{\"sentence\": \"I feel happy.\"}' \\\n    https://demo.connectrpc.com/connectrpc.eliza.v1.ElizaService/Say\n```\n\nConnect uses [Protobuf-ES](https://github.com/bufbuild/protobuf-es), the only\n[fully-compliant](https://buf.build/blog/protobuf-conformance) Protobuf JavaScript library.\n\nConnect implements RPC three protocols: The widely available gRPC and\ngRPC-web protocols, and Connect's [own protocol](https://connectrpc.com/docs/protocol/),\noptimized for the web. This gives you unparalleled interoperability across many\nplatforms and languages, with type safety end-to-end.\n\n## Get started on the web\n\nFollow our [10-minute tutorial](https://connectrpc.com/docs/web/getting-started) where\nwe use [Vite](https://vitejs.dev/) and [React](https://reactjs.org/) to create a\nweb interface for ELIZA.\n\nFor other frameworks, such as **Svelte**, **Vue**, **Next.js** and **Angular**, see [our examples](https://github.com/connectrpc/examples-es).\nFor **TanStack Query**, see our expansion pack [Connect-Query](https://github.com/connectrpc/connect-query-es).\n\n## Get started on Node.js\n\nFollow our [10-minute tutorial](https://connectrpc.com/docs/node/getting-started)\nto spin up a service in Node.js, and call it from the web, and from a gRPC client\nin your terminal.\n\nYou can serve your Connect RPCs with vanilla Node.js, or use our [server plugins](https://connectrpc.com/docs/node/server-plugins)\nfor **Fastify**, **Next.js**, and **Express**.\n\n## Migrating from version 1\n\nIf you are migrating from v1 to v2, check out our [migration guide](./MIGRATING.md).\n\n## Other platforms\n\nWould you like to use Connect on other platforms like Bun, Deno, Vercel’s Edge Runtime,\nor Cloudflare Workers? We’d love to learn about your use cases and what you’d like to do\nwith Connect. You can reach us either through the [Buf Slack](https://buf.build/links/slack/)\nor by filing a [GitHub issue](https://github.com/connectrpc/connect-es/issues) and we’d\nbe more than happy to chat!\n\n## Packages\n\n- [@connectrpc/connect](https://www.npmjs.com/package/@connectrpc/connect):\n  RPC clients and servers for your schema ([source code](packages/connect)).\n- [@connectrpc/connect-web](https://www.npmjs.com/package/@connectrpc/connect-web):\n  Adapters for web browsers and any other platform that has the fetch API on board.\n- [@connectrpc/connect-node](https://www.npmjs.com/package/@connectrpc/connect-node):\n  Serve RPCs on vanilla Node.js servers. Call RPCs with any protocol.\n- [@connectrpc/connect-fastify](https://www.npmjs.com/package/@connectrpc/connect-fastify):\n  Plug your services into a [Fastify](https://www.fastify.io/) server.\n- [@connectrpc/connect-next](https://www.npmjs.com/package/@connectrpc/connect-next):\n  Serve your RPCs with [Next.js](https://nextjs.org/) API routes.\n- [@connectrpc/connect-express](https://www.npmjs.com/package/@connectrpc/connect-express):\n  Adds your services to an [Express](https://expressjs.com/) server.\n\n## Ecosystem\n\n- [examples-es](https://github.com/connectrpc/examples-es):\n  Examples for using Connect with various TypeScript web frameworks and tooling\n- [validate-es](https://www.npmjs.com/package/@connectrpc/validate):\n  [Protovalidate](https://protovalidate.com) interceptor for Connect.\n- [connect-query-es](https://github.com/connectrpc/connect-query-es):\n  TypeScript-first expansion pack for TanStack Query that gives you Protobuf superpowers\n- [connect-playwright-es](https://github.com/connectrpc/connect-playwright-es):\n  Playwright tests for your Connect application\n- [connect-swift](https://github.com/connectrpc/connect-swift):\n  Idiomatic gRPC \u0026 Connect RPCs for Swift\n- [connect-go](https://github.com/connectrpc/connect-go):\n  Go implementation of gRPC, gRPC-Web, and Connect\n- [examples-go](https://github.com/connectrpc/examples-go):\n  Example RPC service powering https://demo.connectrpc.com and built with connect-go\n- [conformance](https://github.com/connectrpc/conformance):\n  gRPC-Web and Connect interoperability tests\n- [Buf Studio](https://buf.build/studio): web UI for ad-hoc RPCs\n\n## Compatibility\n\nAll maintained releases of Node.js ([Current, Active LTS, and the Maintenance LTS release](https://nodejs.org/en/about/previous-releases))\nare supported.\n\n[Baseline web browsers](https://developer.mozilla.org/en-US/docs/Glossary/Baseline/Compatibility)\nfrom the last 2.5 years are supported.\n\n[Same as Definitely Typed](https://github.com/DefinitelyTyped/DefinitelyTyped#support-window),\nwe support versions of TypeScript that are less than 2 years old, with default compiler\nsettings. Note that for some changes in TypeScript, it is impossible to support both\nnew and old versions in the support window. We break the tie by supporting the newer\nversion.\n\n## Status\n\nThis project is stable and follows semantic versioning, which means any breaking changes will result in a major version increase.\nOur goal is to not make breaking changes unless absolutely necessary.\n\n## Legal\n\nOffered under the [Apache 2 license](/LICENSE).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fconnectrpc%2Fconnect-es","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fconnectrpc%2Fconnect-es","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fconnectrpc%2Fconnect-es/lists"}