11 lines
241 B
TypeScript
11 lines
241 B
TypeScript
import { ConvexHttpClient } from "convex/browser"
|
|
|
|
let client: ConvexHttpClient | null = null
|
|
|
|
export function getConvexClient() {
|
|
if (!client) {
|
|
client = new ConvexHttpClient(process.env.NEXT_PUBLIC_CONVEX_URL!)
|
|
}
|
|
return client
|
|
}
|