Skip to main content
oRPC is a modern RPC framework with first-class TypeScript support. ff-serv provides a handler that wraps @orpc/server routers.

Installation

Basic Usage

With Effect Context

Pass Effect-based options to provide context to your oRPC handlers:

Dynamic Options

Options can be computed per-request:

Options as Effect

Options can also be an Effect:

Client Setup

Connect from the client using @orpc/client:

With ff-effect Client Wrapper

Use ff-effect’s wrapClient to call oRPC from Effect code:

Complete Example

src/server.ts
src/client.ts

Type Signature

  • handler: An oRPC FetchHandler (from @orpc/server/fetch)
  • opt: Context and options to pass to oRPC, as a value, Effect, or request function
The oRPC handler matches all requests by default. Place it after any custom basicHandler routes if you want to handle specific paths separately.