You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -18,13 +17,13 @@ import WorkerFailedToStartWhenRunningDevCommand from "/snippets/worker-failed-to
18
17
19
18
## Overview
20
19
21
-
Supabase edge functions allow you to trigger tasks either when an event is sent from a third party (e.g. when a new Stripe payment is processed, when a new user signs up to a service, etc), or when there are any changes / updates to your Supabase database.
20
+
Supabase edge functions allow you to trigger tasks either when an event is sent from a third party (e.g. when a new Stripe payment is processed, when a new user signs up to a service, etc), or when there are any changes or updates to your Supabase database.
22
21
23
22
This guide shows you how to set up and deploy a simple Supabase edge function example that triggers a task when an edge function URL is accessed.
24
23
25
24
## Prerequisites
26
25
27
-
- Setup a project in [Supabase](https://supabase.com/) and have the Supabase CLI installed
26
+
- Setup a new [Supabase project](https://supabase.com/docs/guides/getting-started) and have the [Supabase CLI](https://supabase.com/docs/guides/cli/getting-started) installed
28
27
- Ensure TypeScript is installed
29
28
-[Create a Trigger.dev account](https://cloud.trigger.dev)
30
29
-[Create a new Trigger.dev project](/guides/dashboard/creating-a-project)
@@ -95,13 +94,13 @@ Install the "Hello World" example task when prompted. We'll use this task to tes
95
94
<CliViewRunStep />
96
95
</Steps>
97
96
98
-
## Create and a new Supabase edge function and trigger a dev run
97
+
## Create a new Supabase edge function and trigger a dev run
99
98
100
99
<Steps>
101
100
102
-
<Steptitle="Create a new edge function using the Supabase CLI">
101
+
<Steptitle="Create a new Supabase edge function">
103
102
104
-
We will call this example edge function `edge-function-trigger`.
103
+
We'll call this example `edge-function-trigger`. In your terminal, run the following command:
105
104
106
105
```bash
107
106
supabase functions new edge-function-trigger
@@ -111,16 +110,15 @@ supabase functions new edge-function-trigger
111
110
112
111
<Steptitle="Update the edge function code">
113
112
114
-
Replace the `edge-function-trigger` placeholder code with the following:
113
+
Replace the placeholder code in your `edge-function-trigger/index.ts` file with the following:
0 commit comments