adapter-standalone
Skill by trpc
Explains how to mount tRPC on Node.js built-in HTTP servers. It covers createHTTPServer(), createHTTPHandler() for custom http.createServer setups, and createHTTP2Handler() for HTTP/2 with TLS.
Install adapter-standalone
Built from the published package, never by AI.
git clone --depth 1 https://github.com/trpc/trpc /tmp/trpc && mkdir -p ~/.claude/skills && cp -r /tmp/trpc/packages/server/skills/adapter-standalone ~/.claude/skills/adapter-standaloneRun in your terminal. Claude Code loads skills from ~/.claude/skills automatically.
git clone --depth 1 https://github.com/trpc/trpc /tmp/trpc && mkdir -p ~/.gemini/antigravity-cli/skills && cp -r /tmp/trpc/packages/server/skills/adapter-standalone ~/.gemini/antigravity-cli/skills/adapter-standaloneAntigravity CLI loads skills from ~/.gemini/antigravity-cli/skills, or .agents/skills for one project.
Skills can run scripts on your machine. Some need an API key: check the README.
About
This skill is a reference for running tRPC on Node.js built-in HTTP servers. It shows how to use createHTTPServer() for a quick standalone server, and createHTTPHandler() when you need your own http.createServer. It also covers createHTTP2Handler() for HTTP/2 over TLS.
The skill explains how to set basePath to strip a URL prefix, add CORS by passing the cors npm package as the middleware option, and limit batch size with maxBatchSize. It is aimed at developers building tRPC APIs on Node.js without a framework such as Express. It depends on the server-setup skill and includes a common mistake note on missing CORS configuration.
Written from the project's SKILL.md and checked against it.
What it can do
- createHTTPServer()Starts a tRPC server on Node.js's built-in HTTP server with a router and context.
- createHTTPHandler()Creates a handler to attach tRPC to a custom http.createServer.
- createHTTP2Handler()Creates a handler for HTTP/2 served over TLS with http2.createSecureServer.
- basePath optionStrips a URL prefix such as /trpc/ before routing to procedures.
- CORS via middlewarePasses the cors npm package as the middleware option for cross-origin requests.
- maxBatchSize optionRejects batch requests with more operations than the set limit with a 400 error.
What you need
- Node.js
- @trpc/server package
- cors npm package for CORS support
- TLS key and certificate files for HTTP/2
- zod for input validation in the example
Try asking
- Set up a tRPC server on Node.js with createHTTPServer and port 3000.
- Add CORS to my tRPC standalone server for http://localhost:5173.
- Mount tRPC under /trpc/ with basePath on a custom http.createServer.
Good to know
- The standalone adapter has no CORS handling by default.
- The HTTP/2 handler needs a TLS key and certificate.
- Batches above maxBatchSize are rejected with 400 Bad Request.
Security check
ANo download-and-run commands, hidden instructions or signs of sending keys out were found.
Checked automatically: packages/server/skills/adapter-standalone/SKILL.md. This looks for known risky patterns and is not a full audit. How grades work
Alternatives to adapter-standalone
All alternatives →Diagnoses slow React components and suggests targeted performance fixes. Built for developers who want to reduce re-renders or list lag in React UIs.
Diagnoses slow React components and suggests targeted performance fixes. Built for React developers who need to reduce re-renders, list lag, or expensive render work.
Designs masterclass-style lectures as slide courses with dense pages, long teacher narration and rare quizzes. Built for subjects where understanding matters more than hands-on practice.
Designs hands-on workshop courses in which the learner practises through exercise and quiz pages instead of watching. It suits workshops, bootcamp sessions and skills the learner should leave able to use.
Analyzes competition and develops market positioning strategies using Porter's Five Forces, Blue Ocean Strategy, and positioning maps. Useful for founders and teams evaluating competitors or preparing a startup or investor pitch.
Designs courses whose content depends on current or external facts. It researches the topic first, records each claim with its source, and builds the outline and pages from fetched material. Built for educators teaching time-sensitive subjects.
Compare with react-component-performance, react-component-performance or lecture-style
adapter-standalone: common questions
Does the tRPC standalone adapter support CORS?
Not by default. The source says you add CORS by passing the cors npm package as the middleware option.
Can tRPC run over HTTP/2?
Yes. The skill describes createHTTP2Handler() for use with http2.createSecureServer and a TLS key and certificate.
What happens when a batch request is too large?
Requests with more operations than maxBatchSize are rejected with a 400 Bad Request. The source advises setting maxItems on the client's httpBatchLink to the same value.
How do I install adapter-standalone?
Run the command above to copy the skill into ~/.claude/skills/. Claude Code picks it up automatically.
Is adapter-standalone free?
The code is published under the MIT licence. The service it connects to may have its own pricing.
Is adapter-standalone safe to use?
It scores 91 of 100. Grades: maintenance A, licence A, quality A. Security check: grade A, no risky patterns found in the files checked. Review the code before you install. How grades work.
What are alternatives to adapter-standalone?
Similar skills: react-component-performance, react-component-performance, lecture-style, workshop-style.
