Supabase Edge functions Integration
Explore how to import Supabase Edge functions with your EZsite application.
What is supabase edge functions ?
Edge Functions are server-side TypeScript functions, distributed globally at the edge—close to your users.
Example of using an Edge Function in EZsite
In the example, I store a string of secret keys in supabase and get the secret keys by calling getkey function. In actual situations, you can store any data that needs to be kept confidential in supabase and then get it through function.
Step 1 - Create a Project
- Open
EZsite. - Enter your dream idea in the text box
For example:
Create a hello world website

- Click "Generate my website".
Step 2 - Get secret keys safely
You can either:
Add a get key button to homepage, click the button to call getkey interface, and display the response result.
getkey interface definition:
url: https://YOUR-PROJECT.supabase.co/functions/v1/getkey
header: {"Authorization": "Bearer YOUR_ANON_KEY"}
Response content: { "key": "xxxx" }
Replace YOUR-PROJECT with your Supabase project reference and YOUR_ANON_KEY with your project's anon (public) key, both found in your Supabase dashboard under Project Settings → API.
Results display:
