mirror of
https://github.com/pockethost/pockethost.git
synced 2025-11-27 15:53:49 +00:00
17 lines
410 B
TypeScript
17 lines
410 B
TypeScript
import { PUBLIC_MOTHERSHIP_URL } from '$src/env'
|
|
import {
|
|
createPocketbaseClient,
|
|
type PocketbaseClient,
|
|
} from './PocketbaseClient'
|
|
|
|
export const client = (() => {
|
|
let clientInstance: PocketbaseClient | undefined
|
|
return () => {
|
|
if (clientInstance) return clientInstance
|
|
|
|
const url = PUBLIC_MOTHERSHIP_URL
|
|
clientInstance = createPocketbaseClient({ url })
|
|
return clientInstance
|
|
}
|
|
})()
|