@ts-pf/server-http
v0.1.3
Published
Fetch Request/Response handler and HTTP HandlerPlugins
Maintainers
Readme
@ts-pf/server-http
FetchHandler and HTTP HandlerPlugins (CORSPlugin, RequestLimitPlugin, header plugins). Calls lookupProcedure + runProcedure from @ts-pf/server. Analog of @ts-pf/message-server.
Agent skill: skills/ts-pf-server-http/. Sync with npx skills experimental_sync -y.
plugins is HTTP-only. RPC call interceptors (CallInterceptor from @ts-pf/server) go on { interceptors } — use applyPlugins to install CallPlugins such as DedupePlugin.
import { applyPlugins, DedupePlugin } from '@ts-pf/server'
import { CORSPlugin, FetchHandler } from '@ts-pf/server-http'
const handler = new FetchHandler(app, {
plugins: [new CORSPlugin()],
interceptors: applyPlugins([new DedupePlugin()]),
})
const result = await handler.handle(request, { prefix: '/rpc', context: { db } })Do not import this package from @ts-pf/client-http.
