Fix server to avoid top-level await import error and statically import admin client
cgen-91f403790ee842ddb386a26f9432a0d2
This commit is contained in:
parent
69b37d283d
commit
0b43fe1b91
1 changed files with 1 additions and 2 deletions
|
|
@ -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 });
|
||||
|
|
|
|||
Loading…
Reference in a new issue