Back to the lesson

Original working file

reference/public/client.js

Code and working example pages keep their original identifiers and sample text. The lesson and file guidance explain them in your language.

import { createClient } from "https://esm.sh/@supabase/supabase-js@2";
import { SUPABASE_URL, SUPABASE_PUBLISHABLE_KEY } from "./config.js";
export const client =
  SUPABASE_URL.includes("YOUR-") || SUPABASE_PUBLISHABLE_KEY.includes("YOUR_")
    ? null
    : createClient(SUPABASE_URL, SUPABASE_PUBLISHABLE_KEY);