adapter-standalone

Mount tRPC routers on Node HTTP or HTTP/2 servers without Express.

2|Updated Apr 11, 2026
One-click install
npx skills add https://github.com/PlazaCC/antes-da-tela --skill adapter-standalone
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: adapter-standalone
Source: https://github.com/PlazaCC/antes-da-tela/tree/main/.agents/skills/adapter-standalone
Command: npx skills add https://github.com/PlazaCC/antes-da-tela --skill adapter-standalone

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Exposes a tRPC router on a plain Node HTTP or HTTP/2 server so teams can serve RPC procedures without bringing a full Express/Koa stack or relying on serverless/edge adapters, simplifying lightweight backend setups and local development.

Core Features & Use Cases

  • Native HTTP mounting: Use createHTTPServer to listen with Node's built-in http server for minimal dependencies and predictable runtime behavior.
  • Custom handler support: Use createHTTPHandler for custom http.createServer workflows such as health checks or mixed route handling.
  • HTTP/2 & TLS: Serve over HTTP/2 with createHTTP2Handler and Node TLS certs for better performance and multiplexing.
  • Routing helpers: Configure basePath to strip URL prefixes, integrate CORS middleware for cross-origin requests, and enforce maxBatchSize to control batched request limits.
  • Use Case: Ideal for microservices, internal tools, or small APIs that require low-footprint servers with explicit control over routing, CORS, and TLS.

Quick Start

Create a minimal Node server that mounts a tRPC router on port 3000 with CORS enabled for http://localhost:5173 and a basePath of /trpc/.

Frequently Asked Questions about adapter-standalone

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I run a tRPC router on a Node HTTP server without Express?

To run tRPC on a Node HTTP server without Express, use createHTTPServer to mount your router directly on Node's built-in http module. This exposes RPC procedures without requiring a full framework or serverless adapter.

Can I serve tRPC over HTTP/2 with TLS support?

Yes, you can serve tRPC over HTTP/2 with TLS support by using createHTTP2Handler. This allows you to utilize Node TLS certificates for better performance and multiplexing on your tRPC procedures.

What is the best way to configure CORS and basePath for a tRPC Node server?

The best way to configure CORS and basePath for a tRPC Node server is using the routing helpers in createHTTPServer. You can strip URL prefixes with basePath and integrate CORS middleware for cross-origin requests.

Does tRPC support custom routing and health checks on a native Node server?

Yes, tRPC supports custom routing and health checks on a native Node server by using createHTTPHandler. This enables custom http.createServer workflows for mixed route handling alongside your tRPC procedures.

Why use Node's built-in HTTP server for tRPC instead of serverless adapters?

Using Node's built-in HTTP server for tRPC provides minimal dependencies and predictable runtime behavior. It is ideal for microservices or internal tools needing lightweight HTTP hosting without relying on serverless or edge adapters.

How do I limit batched requests on a tRPC Node HTTP server?

To limit batched requests on a tRPC Node HTTP server, configure the maxBatchSize option. This enforces controlled batching limits to manage request volume on your mounted tRPC procedures.