Supabase Edge Functions Quickstart

preview_player
Показать описание
We’re back with another Supabase tutorial - we're talking Edge Functions, showcasing how they make your project much more functional.

Edge Functions are server-side TypeScript functions, distributed globally at the edge—close to your users. They can be used for listening to webhooks or integrating your Supabase project with third-parties like Stripe. Edge Functions are developed using Deno.

This video covers everything from setting up your environment with the most recent Supabase CLI to configuring VS Code for Deno development and will teach you to create server-side TypeScript functions that operate at the edge, optimizing performance for your users.

We'll walk you through importing npm packages directly into your functions, setting up a Supabase-js client, and utilizing preset environment variables to make development much easier.

What you'll learn:

✅ VS Code and Deno Configuration: Get your VS Code ready for Deno with recommended settings and extensions, tailored for Supabase Edge Functions.

✅ How to Create Edge Functions in Supabase: Step-by-step guide to creating your first Edge Function, ready to integrate with services like Stripe or handle webhooks.

✅ Importing npm Packages: Learn the convenience of importing npm packages directly, expanding your function's capabilities.

✅ Supabase-js Client and Environment Variables: Establish a Supabase-js client within your function and leverage preset environment variables for efficient and secure development.

After watching this video, you'll be able to:

✅ Develop and Deploy Edge Functions: Confidently develop and deploy Edge Functions in your Supabase project.

✅ Manage Environment Secrets: Set and managing environment secrets within Supabase, safeguarding your project's sensitive data and ensuring compliance.

Chapters:
00:00 Supabase Edge Functions Quickstart
00:20 Generate VScode settings for Deno
00:58 Install the Deno Language Server extension for VScode
02:05 Import packages from npm
03:05 Create a supabase-js client
03:18 Use the preset environment variables
05:34 Set environment secrets
07:22 Link your Supabase project
07:52 Serve Edge Functions locally
09:00 Inspect the local Supabase Studio
09:40 Managing Row Level Security policies
11:20 Deploy the Edge Function to Supabase
11:42 Inspect the Edge Function in the Supabase Dashboard
---
Learn more about Supabase 👇

💻 Videos to watch next:

📱 Connect with Us:

ABOUT SUPABASE:
Supabase is the open source Firebase alternative. Supabase provides a full Postgres database for every project with pgvector, backups, realtime, and more. Add and manage email and password, passwordless, OAuth, and mobile logins to your project through a suite of identity providers and APIs.

Build in a weekend, scale to millions.

#Supabase #AppDevelopment #RealtimeApps #DeveloperTools
Рекомендации по теме
Комментарии
Автор

Supabase has changed how I work with projects on a development level. thanks team!

devdeclan
Автор

Can you please tell me what VS Code theme you're using? It's really pleasing and I've been looking for it for a while now.

mokendkomer
Автор

For those of you that get the message: Error: No available formula with the name "supabase". Did you mean sparse?
Just do
brew install supabase/tap/supabase

PedroCarloto
Автор

Can I specify a target role when using supabase api in the edge function?

ChrisChan
Автор

Sometimes the terminal was off screen..

Norfeldt
Автор

Hi I cannot find in docs what are concurrency limit of an edge function? Can I change it somehow?

Typnickman-
Автор

Weird that the deploy ran different than local when there wasn't a table. In local it threw an error and product it just came undefined.. It's a nightmare to debug if these two don't behave the same

Norfeldt
Автор

I have a question, can I use express instead of Deno server? Because I saw this in the documentation

And if so, is there any drawbacks for using express instead of Deno?

azoozym
Автор

I am having several pronlems running supabase edge functions on my machine, the commands supabase new … keep on failing. Reinstalled supabase cli installed deno but still fails. Everything else works getting types, creating migrations etc.

yarapolana
Автор

can you get reporting and monitoring on selfhosted edge functions from the supabase web dashboard?

ridhwaans
Автор

this video needs an intro, not helpful at all

edgargut
Автор

How do I disable typescript - it won't allow bundling because of typescript errors :(

RuneJeppesen