mirror of
https://github.com/supabase/supabase.git
synced 2026-10-08 02:45:07 +03:00
Update "Connect to Postgres" example with correct env variable for Postgres DB
See https://supabase.com/docs/guides/functions/secrets
This commit is contained in:
1 parent
755409c0c8
commit
eff85d2c80
1 file changed
+2
-2
@@ -22,8 +22,8 @@ Supabase Edge Functions allow you to go beyond HTTP and can connect to your Post
|
||||
import * as postgres from 'https://deno.land/x/postgres@v0.14.2/mod.ts'
|
||||
import { serve } from 'https://deno.land/std@0.177.0/http/server.ts'
|
||||
|
||||
// Get the connection string from the environment variable "DATABASE_URL"
|
||||
const databaseUrl = Deno.env.get('DATABASE_URL')!
|
||||
// Get the connection string from the environment variable "SUPABASE_DB_URL"
|
||||
const databaseUrl = Deno.env.get('SUPABASE_DB_URL')!
|
||||
|
||||
// Create a database pool with three connections that are lazily established
|
||||
const pool = new postgres.Pool(databaseUrl, 3, true)
|
||||
|
||||
Reference in new issue
Block a user