Skip to content

The Postgres development platform. Supabase gives you a dedicated Postgres database to build your web, mobile, and AI applications.

fixes to the function landing page

Inian1f62df540c08
diff --git a/apps/www/data/products/functions/usecase-examples.js b/apps/www/data/products/functions/usecase-examples.js
index 93a49b1b783..1699f9d7617 100644
--- a/apps/www/data/products/functions/usecase-examples.js
+++ b/apps/www/data/products/functions/usecase-examples.js
@@ -21,10 +21,10 @@ await client.connect({
serve(async (_req) => {
await client.send({
- subject: "Notifications Ui has launched",
- content: "And this is a notification about that",
+ subject: "Thank you for signing up",
+ content: "We sell the best roadrunner traps in the world!",
});
return new Response("Email sent", { status: 200 });
@@ -38,7 +38,7 @@ serve(async (_req) => {
code: `import { serve } from "https://deno.land/[email protected]/http/server.ts";
import * as postgres from "https://deno.land/x/[email protected]/mod.ts";
-const databaseUrl = Deno.env.get("DATABASE_URL") ?? "";
+const databaseUrl = Deno.env.get("SUPABASE_DB_URL") ?? "";
const pool = new postgres.Pool(databaseUrl, 3, true);
const connection = await pool.connect();
@@ -60,7 +60,7 @@ import { createClient } from "https://esm.sh/@supabase/[email protected]";
serve(async (req) => {
const SUPABASE_URL = Deno.env.get("SUPABASE_URL") ?? "";
- const SERVICE_KEY = Deno.env.get("SERVICE_KEY") ?? "";
+ const SERVICE_KEY = Deno.env.get("SUPABASE_SERVICE_ROLE_KEY") ?? "";
const supabase = createClient(SUPABASE_URL, SERVICE_KEY);
if (req.headers.get("Authorization") === "super-secret-key") {
const { data } = await supabase.storage
@@ -82,7 +82,7 @@ import { createClient } from "https://esm.sh/@supabase/[email protected]";
serve(async () => {
const SUPABASE_URL = Deno.env.get("SUPABASE_URL") ?? "";
- const SERVICE_KEY = Deno.env.get("SERVICE_KEY") ?? "";
+ const SERVICE_KEY = Deno.env.get("SUPABASE_SERVICE_ROLE_KEY") ?? "";
const supabase = createClient(SUPABASE_URL, SERVICE_KEY);
const { data } = await supabase.from("todos").select();
return new Response(JSON.stringify(data), {
diff --git a/apps/www/pages/edge-functions/edge-functions.tsx b/apps/www/pages/edge-functions/edge-functions.tsx
index 6d5d126c5fc..a8e5fa44b2d 100644
--- a/apps/www/pages/edge-functions/edge-functions.tsx
+++ b/apps/www/pages/edge-functions/edge-functions.tsx
@@ -80,7 +80,7 @@ function Database() {
}
const title = 'Serverless Edge Functions that automatically scale'
- const subtitle = `Execute your code closest to your users with fast deploy times and low latency.`
+ const subtitle = `Write functions in Deno, a modern runtime for Typescript and WASM.`
const meta_title = `${title}`
const meta_description = subtitle