-
Notifications
You must be signed in to change notification settings - Fork 3
Open
Description
SolidStart cannot parse API routes with .civet filetype. It is perceived as a normal page route even though it has exported GET and POST. My example with a trpc API route, src/routes/api/trpc/[...].civet:
import { APIEvent } from "solid-start/api";
import { fetchRequestHandler } from "@trpc/server/adapters/fetch";
import { appRouter } from "~/lib/router.civet";
const handler = (event: APIEvent) =>
fetchRequestHandler({
endpoint: "/api/trpc",
req: event.request,
router: appRouter,
createContext: () => ({}),
});
export const GET = handler;
export const POST = handler;Unless I rename it and write it in normal typescript, it won't register as an API route. src/routes/api/trpc/[...].ts works fine.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels