1.0.0-fixed-docs
Supabase edge runtime helper function
Attributes
Includes Deno configuration
Repository
Current version released
6 months ago
Versions
webpnk/supabase-edge-serve
A Deno.serve()
wrapper for Supabase edge runtime
Features:
- CORS auto-handled
- extra
response
param with pre-configured options, to use instead of vanillaResponse
Usage
import { serve } from "https://deno.land/x/supabase_edge_serve@1.0.0/mod.ts";
serve((req, response, info) => {
return response.json({ success: true }, { status: 201 })
})
With custom cors
import { serve } from "https://deno.land/x/supabase_edge_serve@1.0.0/mod.ts";
serve((req, response, info) => {
return response.json({ success: true }, { status: 201 })
}, {
cors: {
origin: 'https://custom-origin.com',
}
})