mirror of
https://github.com/supabase/supabase.git
synced 2026-12-06 00:19:08 +00:00
chore(docs) - fix missing imports for supabase server + remove comment from snippet (#53635)
## Problem Missing imports + a comment that prevents easy copy / paste in the edge functions quickstart. Both of these actually caused the Edge Functions quickstart to fail / not work as intended. ## Solution Adds imports + removes comment ## Preview links https://docs-git-kody-devrel-874-quickstart-error-codes-a3bfdf-supabase.vercel.app/docs/guides/functions/quickstart --------- Co-authored-by: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
ea600239ce
commit
3da15da39a
1 file changed
+4
-2
@@ -35,7 +35,7 @@ If you already have a project locally, navigate to your project directory. If yo
|
||||
|
||||
```bash
|
||||
cd your-existing-project
|
||||
supabase init # Initialize Supabase, if you haven't already
|
||||
supabase init
|
||||
```
|
||||
|
||||
<Admonition type="note">
|
||||
@@ -63,6 +63,8 @@ When an HTTP request is sent to Edge Functions, you can use Supabase Auth to sec
|
||||
This creates a new function at `supabase/functions/hello-world/index.ts` with this starter code:
|
||||
|
||||
```tsx
|
||||
import { withSupabase } from 'npm:@supabase/server@1'
|
||||
|
||||
export default {
|
||||
fetch: withSupabase({ auth: ['publishable', 'secret'] }, async (req, ctx) => {
|
||||
const { name } = await req.json()
|
||||
@@ -87,7 +89,7 @@ The `supabase functions new` command also optionally creates Deno configuration
|
||||
After starting Docker, start the local development server to test your function:
|
||||
|
||||
```bash
|
||||
supabase start # Start all Supabase services
|
||||
supabase start
|
||||
supabase functions serve hello-world
|
||||
```
|
||||
|
||||
|
||||
Reference in new issue
Block a user