|
1 | 1 | ---
|
2 |
| -title: "Triggering tasks from Supabase edge functions" |
3 |
| -sidebarTitle: "Supabase" |
| 2 | +title: "Triggering tasks from Supabase database webhooks" |
| 3 | +sidebarTitle: "Supabase edge functions - database webhooks" |
4 | 4 | description: "This guide will show you how to trigger a task from a Supabase edge function, and then view the run."
|
5 | 5 | icon: "bolt"
|
6 | 6 | ---
|
@@ -144,18 +144,19 @@ First, go to your Trigger.dev project and copy the `dev` secret key from the API
|
144 | 144 | Then create an `.env` file in the functions folder, and add your `TRIGGER_SECRET_KEY`.
|
145 | 145 |
|
146 | 146 | ```ts functions/.env
|
147 |
| -TRIGGER_SECRET_KEY="your-secret-key"; |
| 147 | +TRIGGER_SECRET_KEY = "your-secret-key"; |
148 | 148 | ```
|
149 | 149 |
|
150 | 150 | <Warning>
|
151 |
| - If you are using GitHub - make sure to include `.env` in your `.gitignore` file before committing any files to GitHub. |
| 151 | + If you are using GitHub - make sure to include `.env` in your `.gitignore` file before committing |
| 152 | + any files to GitHub. |
152 | 153 | </Warning>
|
153 | 154 |
|
154 | 155 | </Step>
|
155 | 156 |
|
156 | 157 | <Step title="Test your new edge function locally">
|
157 | 158 |
|
158 |
| -To do this, open up two terminal windows in your project. |
| 159 | +To do this, open up two terminal windows in your project. |
159 | 160 |
|
160 | 161 | In the first terminal window run:
|
161 | 162 |
|
@@ -210,7 +211,7 @@ Go to your Trigger.dev project and copy the `prod` secret key from the API keys
|
210 | 211 |
|
211 | 212 | 
|
212 | 213 |
|
213 |
| -Then, in Supabase, navigate to your settings page, click 'Edge functions' in the configurations menu, and then click the 'Add new secret' button. |
| 214 | +Then, in Supabase, navigate to your settings page, click 'Edge functions' in the configurations menu, and then click the 'Add new secret' button. |
214 | 215 |
|
215 | 216 | Add `TRIGGER_SECRET_KEY` with the pasted value of your Trigger.dev `prod` secret key.
|
216 | 217 |
|
@@ -264,7 +265,7 @@ yarn dlx trigger.dev@beta deploy
|
264 | 265 |
|
265 | 266 | To do this all you need to do is simply open the `edge-function-trigger` URL.
|
266 | 267 |
|
267 |
| -On your Supabase dashboard, go to your Edge function dashboard, copy the URL, and paste it into your browser. |
| 268 | +On your Supabase dashboard, go to your Edge function dashboard, copy the URL, and paste it into your browser. |
268 | 269 |
|
269 | 270 | Once loaded you should see ‘OK’ on the new screen.
|
270 | 271 |
|
|
0 commit comments