mirror of
https://github.com/YuzuZensai/Minikura.git
synced 2026-03-30 14:25:37 +00:00
✨ feat: topology, and improves handling
This commit is contained in:
12
apps/web/lib/api-client.ts
Normal file
12
apps/web/lib/api-client.ts
Normal file
@@ -0,0 +1,12 @@
|
||||
import { treaty } from "@elysiajs/eden";
|
||||
import type { App } from "@minikura/backend";
|
||||
|
||||
const baseUrl = process.env.NEXT_PUBLIC_API_URL || "http://localhost:3000";
|
||||
|
||||
export const api = treaty<App>(baseUrl, {
|
||||
fetch: {
|
||||
credentials: "include",
|
||||
},
|
||||
});
|
||||
|
||||
export type Api = typeof api;
|
||||
Reference in New Issue
Block a user