Global Edge Logic
Deploy your custom server-side logic to our globally distributed network. Built on the modern **Deno** runtime, Afribase Edge Functions provide ultra-low latency, automatic scaling, and native TypeScript support without the overhead of traditional server management.
Deno Runtime
Edge Functions are built with the modern **Deno** runtime, providing built-in security and adherence to modern Web Standards.
TypeScript First
Native TypeScript support without the need for complex transpilation or build steps.
Web Standards
Support for Fetch API, Streams, and standard URL parsing out of the box.
Development Workflow
Write your Logic
import { serve } from "https://deno.land/std/http/server.ts";
serve(async (req) => {
const { name } = await req.json();
return new Response(JSON.stringify({
message: `Hello ${name} from the edge!`
}));
});Deploy via CLI
afribase functions deploy hello-worldInvoke from Client
JavaScript
const { data, error } = await afribase.functions.invoke('hello-world', {
body: { name: 'Afribase User' }
});Python
result = client.functions.invoke("hello-world", body={"name": "Afribase User"})Dart / Flutter
final result = await client.functions.invoke('hello-world', body: {'name': 'Afribase User'});Real-time Monitoring
Invocation Logs
Stream execution logs directly to your dashboard as they happen. Filter by status code, timestamp, or specific log level.
Performance Metrics
Track cold start times, execution duration, and memory usage to optimize your serverless functions.
