Integrations
SolidStart
Use Katman with SolidStart API routes.
SolidStart uses file-based API routes powered by Nitro. Katman integrates via a catch-all endpoint.
Setup
Create a catch-all API route:
// src/routes/api/rpc/[...path].ts
import { } from "katman/solidstart"
import { } from "~/server/rpc"
const = (, {
: "/api/rpc",
: () => ({
: getDB(),
: .(.request.headers),
}),
})
export const =
export const = Procedures are accessible at:
POST /api/rpc/users/list
POST /api/rpc/users/create
GET /api/rpc/healthContext from SolidStart middleware
Access middleware data through the event object:
katmanSolidStart(appRouter, {
: () => ({
: .locals.user,
}),
})What's next?
- Server — standalone
serve()as an alternative - Integrations — other available integrations