Initial commit from create-turbo
This commit is contained in:
@@ -0,0 +1,15 @@
|
||||
// client.ts
|
||||
import { treaty } from '@elysiajs/eden'
|
||||
import { Route } from '$routes/route-types'
|
||||
|
||||
export type Client = ReturnType<typeof treaty<Route>>
|
||||
|
||||
export const makeClient = (url: string): Client => {
|
||||
const client = treaty<Route>(url, {
|
||||
fetch: {
|
||||
credentials: 'include',
|
||||
},
|
||||
})
|
||||
|
||||
return client
|
||||
}
|
||||
Reference in New Issue
Block a user