mirror of
https://github.com/supabase/supabase.git
synced 2026-10-05 09:25:06 +03:00
chore: moves cloudflare from blog to integration doc
This commit is contained in:
1 parent
763d8a3d88
commit
b0c642779b
12 files changed
+22
-17
No files matched your search
+16
-17
@@ -1,40 +1,37 @@
|
||||
---
|
||||
title: Cloudflare Integrates with Supabase
|
||||
description: Using Supabase from your Cloudflare Workers just got even easier.
|
||||
author: ant_wilson
|
||||
image: 2023-05-09-beta-update-april/monthly-update-april-2023.jpg
|
||||
thumb: 2023-05-09-beta-update-april/monthly-update-april-2023.jpg
|
||||
tags:
|
||||
- release-notes
|
||||
date: '2023-05-18'
|
||||
toc_depth: 3
|
||||
---
|
||||
import Layout from '~/layouts/DefaultGuideLayout'
|
||||
|
||||
export const meta = {
|
||||
id: 'cloudflare-workers',
|
||||
title: 'Cloudflare Workers',
|
||||
description:
|
||||
"Using Supabase from your Cloudflare Workers just got even easier.",
|
||||
}
|
||||
|
||||
Using Supabase in Cloudflare Workers has always been a great way to interact with your data from the edge. Supabase-js communicates with your Supabase Postgres instance via HTTP using PostgREST, so you never need to worry about running out of database connections.
|
||||
|
||||
In this post we'll walk you through a new addition to the Cloudflare Workers dashboard - the ability to authenticate directly with your Supabase account, and automatically inject your Supabase environment variables into your Worker code.
|
||||
In this guide we'll walk you through a new addition to the Cloudflare Workers dashboard - the ability to authenticate directly with your Supabase account, and automatically inject your Supabase environment variables into your Worker code.
|
||||
|
||||
## How To Enable Supabase Integration in Cloudflare Workers
|
||||
|
||||
Start by heading to the [Cloudflare Dashboard](https://dash.cloudflare.com), go to the Workers & Pages tab and hit 'Create Application' followed by 'Create Worker'.
|
||||
|
||||

|
||||

|
||||
|
||||
Deploy the Hello World example Worker. Once it's deployed hit 'Configure Worker'.
|
||||
|
||||

|
||||

|
||||
|
||||
On the configuration page select the Settings tab, followed by the Integrations option.
|
||||
|
||||
You should now see the database integration options. On the Supabase card, click 'Add Integration'
|
||||
|
||||

|
||||

|
||||
|
||||
After reviewing and accepting the terms, you will be shown the option to connect and a Supabase popup should appear.
|
||||
|
||||
Follow the flow by selecting your Supabase Org and the Project you wish to connect to. If you don't have any projects yet, head over to the [Supabase Dashboard](https://app.supabase.com) to create one.
|
||||
|
||||

|
||||

|
||||
|
||||
Once it's connected you will be given the option to select which Supabase Key you want to pull into the Worker context.
|
||||
|
||||
@@ -42,10 +39,12 @@ The `Anon` key here is one that always adhires to the Database's RLS policies (r
|
||||
|
||||
The `Service Role` is typically ok to use in backend contexts, such as Cloudflare Workers, but note that this key **bypasses your Row Level Security policies**, and has the ablity to read, write, and delete any data in your database.
|
||||
|
||||

|
||||

|
||||
|
||||
Once this is done the `SUPABASE_KEY` and `SUPABASE_URL` environment variables will now be available from your Cloudflare Worker code.
|
||||
|
||||

|
||||
|
||||
You can now install the supabase-js client in your Worker:
|
||||
|
||||
`npm install @supabase/supabase-js`
|
||||
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Binary file not shown.
|
After Width: | Height: | Size: 117 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 8.3 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 12 KiB |
File renamed without changes.
File renamed without changes.
@@ -552,6 +552,12 @@
|
||||
<changefreq>0.5</changefreq>
|
||||
</url>
|
||||
|
||||
<url>
|
||||
<loc>https://supabase.com/docs/guides/integrations/cloudflare-workers</loc>
|
||||
<changefreq>weekly</changefreq>
|
||||
<changefreq>0.5</changefreq>
|
||||
</url>
|
||||
|
||||
<url>
|
||||
<loc>https://supabase.com/docs/guides/integrations/dhiwise</loc>
|
||||
<changefreq>weekly</changefreq>
|
||||
|
||||
Reference in new issue
Block a user