Loading...
Loading...
Supabase PostgreSQL backend-as-a-service with realtime. Use for serverless PostgreSQL.
npx skill4agent add g1joshi/agent-skills supabasepgvectorimport { createClient } from "@supabase/supabase-js";
const supabase = createClient("https://xyz.supabase.co", "public-anon-key");
// Listen to changes
const subscription = supabase
.channel("public:messages")
.on(
"postgres_changes",
{ event: "INSERT", schema: "public", table: "messages" },
(payload) => {
console.log("New message:", payload);
},
)
.subscribe();CREATE POLICY "Users can see own data" ON "profiles"
FOR SELECT USING (auth.uid() = user_id);supabase gen types typescriptservice_role