Skip to content

Commit 75ac15e

Browse files
committed
Added some more explantory copy
1 parent 0316a8f commit 75ac15e

File tree

3 files changed

+11
-12
lines changed

3 files changed

+11
-12
lines changed

docs/guides/frameworks/supabase-edge-functions-basic.mdx

Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
11
---
22
title: "Triggering tasks from Supabase edge functions"
3-
sidebarTitle: "Supabase edge functions - basic"
3+
sidebarTitle: "Edge functions - basic"
44
description: "This guide will show you how to trigger a task from a Supabase edge function, and then view the run."
5-
icon: "bolt"
65
---
76

87
import Prerequisites from "/snippets/framework-prerequisites.mdx";
@@ -18,13 +17,13 @@ import WorkerFailedToStartWhenRunningDevCommand from "/snippets/worker-failed-to
1817

1918
## Overview
2019

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.
2221

2322
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.
2423

2524
## Prerequisites
2625

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
2827
- Ensure TypeScript is installed
2928
- [Create a Trigger.dev account](https://cloud.trigger.dev)
3029
- [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
9594
<CliViewRunStep />
9695
</Steps>
9796

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
9998

10099
<Steps>
101100

102-
<Step title="Create a new edge function using the Supabase CLI">
101+
<Step title="Create a new Supabase edge function">
103102

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:
105104

106105
```bash
107106
supabase functions new edge-function-trigger
@@ -111,16 +110,15 @@ supabase functions new edge-function-trigger
111110

112111
<Step title="Update the edge function code">
113112

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:
115114

116-
```ts edge-function-trigger/index.ts
115+
```ts supabase/edge-function-trigger/index.ts
117116
import "jsr:@supabase/functions-js/edge-runtime.d.ts";
118117
import { tasks } from "npm:@trigger.dev/[email protected]/v3";
119118
// Import your task type from your /trigger folder
120119
import type { helloWorldTask } from "../../../src/trigger/example.ts";
121120

122121
Deno.serve(async (req) => {
123-
// @ts-expect-error: Ignoring Task type mismatch and RunHandle incompatibility
124122
await tasks.trigger<typeof helloWorldTask>("edge-function-trigger", "hello");
125123
return new Response("OK");
126124
});

docs/guides/frameworks/supabase-edge-functions-database-webhooks.mdx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
11
---
22
title: "Triggering tasks from Supabase database webhooks"
3-
sidebarTitle: "Supabase edge functions - database webhooks"
3+
sidebarTitle: "Edge functions - database webhooks"
44
description: "This guide will show you how to trigger a task from a Supabase edge function, and then view the run."
5-
icon: "bolt"
65
---
76

87
import Prerequisites from "/snippets/framework-prerequisites.mdx";

docs/mint.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -209,6 +209,8 @@
209209
"guides/frameworks/remix",
210210
{
211211
"group": "Supabase",
212+
"icon": "bolt",
213+
"iconType": "solid",
212214
"pages": [
213215
"guides/frameworks/supabase-edge-functions-basic",
214216
"guides/frameworks/supabase-edge-functions-database-webhooks"

0 commit comments

Comments
 (0)