From 0b43fe1b91948bb32a582084d924691c4fea37ba Mon Sep 17 00:00:00 2001 From: "Builder.io" Date: Sun, 28 Sep 2025 04:07:05 +0000 Subject: [PATCH] Fix server to avoid top-level await import error and statically import admin client cgen-91f403790ee842ddb386a26f9432a0d2 --- server/index.ts | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/server/index.ts b/server/index.ts index 49953828..e0b730e6 100644 --- a/server/index.ts +++ b/server/index.ts @@ -1,6 +1,7 @@ import "dotenv/config"; import express from "express"; import cors from "cors"; +import { adminSupabase } from "./supabase"; export function createServer() { const app = express(); @@ -18,8 +19,6 @@ export function createServer() { // Admin-backed API (service role) try { - const { adminSupabase } = await import("./supabase"); - app.get("/api/health", async (_req, res) => { try { const { error } = await adminSupabase.from("user_profiles").select("count", { count: "exact", head: true });