Mode:
Duration:
1
Coding works best on desktop or with an external keyboard.
Coding works best on desktop or with an external keyboard.
Handles POST request JSON body and responds.
# supabase/demo/post.ts
import { serve } from 'https://deno.land/std@0.168.0/http/server.ts';
serve(async (req) => {
if (req.method === 'POST') {
const body = await req.json();
return new Response(JSON.stringify({ received: body }), { status: 200, headers: { 'Content-Type': 'application/json' } });
}
return new Response('Method Not Allowed', { status: 405 });
});Supabase Edge Functions are serverless functions deployed at the edge using Deno runtime, enabling developers to run backend logic close to users with low latency.
Origin & Creator
Supabase Edge Functions were launched by Supabase in 2021 as part of their serverless edge platform.
Industrial Note
Supabase Edge Functions are optimized for developers looking to extend Supabase applications with serverless backend logic that runs near users worldwide.