Project created from basic template

This commit is contained in:
Quests Agent
2025-09-29 17:56:30 +02:00
commit a4ecf845bf
26 changed files with 3887 additions and 0 deletions

21
src/server/routes/rpc.ts Normal file
View File

@@ -0,0 +1,21 @@
import { RPCHandler } from "@orpc/server/fetch";
import { router } from "@/server/rpc";
import { Hono } from "hono";
export const rpcApp = new Hono();
const handler = new RPCHandler(router);
rpcApp.use("/*", async (c, next) => {
const { matched, response } = await handler.handle(c.req.raw, {
prefix: "/rpc",
});
if (matched) {
return c.newResponse(response.body, response);
}
await next();
return;
});