A Deno.serve()
wrapper for Supabase edge runtime
Features:
- CORS auto-handled
- extra
response
param with pre-configured options, to use instead of vanillaResponse
import { serve } from "https://deno.land/x/[email protected]/mod.ts";
serve((req, response, info) => {
return response.json({ success: true }, { status: 201 })
})
import { serve } from "https://deno.land/x/[email protected]/mod.ts";
serve((req, response, info) => {
return response.json({ success: true }, { status: 201 })
}, {
cors: {
origin: 'https://custom-origin.com',
}
})