Something went wrong. Try again.
Monorepo for wisp.place. A static site hosting service built on top of the AT Protocol.
Something went wrong. Try again.
277 B · 8 lines
TypeScript
123456789import { treaty } from '@elysiajs/eden'
import type { app } from '@server'
// Use the current host instead of hardcoded localhostconst apiHost = typeof window !== 'undefined' ? window.location.origin : 'http://localhost:8000'
export const api = treaty<typeof app>(apiHost)