737 B
737 B
postgres-on-the-edge
This function allows you to access your Supabase database directly via TCP from an edge function.
You can add a global cache to your database for fast access to your data, globally by simply connecting your Supabase database to PolyScale.
Setup
- Rename
.env.example
to.env
- Insert Supabase database connection string for
DATABASE_URL
in.env
file - Replace
DATABASE_URL
with PolyScale connection string.
Deploy
- Run
supabase functions deploy --no-verify-jwt postgres-on-the-edge
- Run
supabase secrets set --env-file supabase/functions/postgres-on-the-edge/.env
Learn more about creating this function here.