MFS401 : Table of Contents

Chapter 6

Lesson 2

Getting Started with Edge Functions: Writing and Deploying our First Edge Function

Foundational

Installing and setting up Supabase CLI

Writing and Deploying a basic Edge Function

Invoking edge function using cURL and supabase-js

Advanced

Debugging Edge Functions using Logs Explorer

Quiz it to win it

Take the quiz

4 Questions
12 XP

In this lesson, we will be writing our first edge function. We will delve into the fundamentals of an edge function, understand its deployment process, explore debugging techniques, and much more. However, before we get started, we need to install the Supabase CLI.

Supabase CLI is a command line interface by Supabase that provides tools to develop projects locally, seamlessly deploy to the Supabase Platform, efficiently manage database migrations, and even auto-generate TypeScript types straight from our database schema.

Since there is a lot to talk about in Supabase CLI, we will learn about them in a later lesson. This lesson will only look into the parts required for developing and deploying edge functions.

Supabase CLI is available via npm, brew, as well as scoop. We can choose one of them based on our development environment. For instance, on MacOS and Linux systems, the CLI is easily accessible via Homebrew, which can be installed using the following command:

Once installation is successful, we can verify it by running supabase -v command in our terminal. It will show the currently installed version if the installation is successful.

Now, we can navigate to our project’s root directory. First, we will link Supabase CLI to our Supabase account by logging in with our personal access token. The personal access token can be generated from the dashboard by following the command output instructions.

Get started for free today!

No commitments. No contracts. Enjoy all features for a day — join in just three clicks!

No credit card required.

Quiz it to win it

Complete this quiz successfully to proceed to the next lesson and win upto 12XP.

Start quiz for this lesson

Completing this quiz will get you

+12 Experience Points

+5% course progress