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.exampleto.env - Insert Supabase database connection string for
DATABASE_URLin.envfile - Replace
DATABASE_URLwith 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.