Supabase Edge Functions Guide
Supabase CLI installed (npm install -g supabase)
Deno installed (required for Edge Functions)
Start Supabase Local Instance
Create a New Edge Function
supabase functions new my-function-name
Check Edge Functions Logs
docker logs -f supabase_edge_runtime_peaq-supabase
supabase functions deploy
supabase functions deploy my-function-name
# POST request
curl -i --location --request POST ' localhost:54321/functions/v1/my-function-name' \
--header ' Authorization: Bearer YOUR_ANON_KEY' \
--header ' Content-Type: application/json' \
--data ' {"name":"Functions"}'
# Replace YOUR_PROJECT_REF with your Supabase project reference
curl -i --location --request POST ' https://YOUR_PROJECT_REF.functions.supabase.co/my-function-name' \
--header ' Authorization: Bearer YOUR_ANON_KEY' \
--header ' Content-Type: application/json' \
--data ' {"name": "test"}'
Edge Functions run on Deno runtime
Local development requires Supabase CLI version 1.0.0 or higher
Functions must be deployed to be accessible in production