With hookdeck recieve webhooks events in Local and monitor all events in production.

Hookdeck is optional. You can directly call the Supabase Edge Function API. But Postgres is not able to call localhost URL directly (net.http_post).

Create an account

Create a source, connections and destinations

  • Source : api
  • Connections:
    • api-prod
    • api-staging
    • api-dev
  • Destinations:
    • prod
    • staging
    • dev

Destinations

Prod & Staging

Create a destination with the HTTP type, and add the Supabase Edge Functions Endpoint.

Dev (Local)

Create a destination with the CLI type, and add the path: /functions/v1/api.

Connection filter

Filter Schema - Headers & Query

Filter with the server name for each connection.

{
	"$or": [
		{
			"server": "prod"
		},
		{
			"server": {
				"$exist": false
			}
		}
	]
}

Install Hookdeck CLI

Hoodeck CLI Local Server

Hookdeck CLI lets you forward webhooks received on any connection to a local web server.

hookdeck login
hookdeck listen <port> <source-name?> <connection-query?>