oRPC Middleware
Installation
SKILL.md
Middleware in oRPC
Middleware is a powerful feature in oRPC that enables reusable and extensible procedures.
Overview
const authMiddleware = os
.$context<{ something?: string }>() // define dependent-context
.middleware(async ({ context, next }) => {
// before
const result = await next({
context: { user: { id: 1, name: 'John' } }
})
// after
return result
})
Related skills
More from ali-master/skills
orpc ecosystem
Community resources, starter kits, tools, and libraries for oRPC.
2orpc event iterator (sse)
Streaming responses, real-time updates, and server-sent events using oRPC.
2orpc comparison
How oRPC differs from tRPC, ts-rest, and Hono.
2orpc openapilink
Use OpenAPILink in oRPC clients to communicate with OpenAPI-compliant APIs.
2orpc metadata
Enhance your procedures with metadata.
2orpc playgrounds
Interactive development environments for exploring and testing oRPC functionality.
2