
Deno Deploy Has a Free API — Ship Serverless Functions Globally in Seconds
Zero Config Serverless Deno Deploy gives you serverless edge functions with zero configuration. Free tier: 100K requests/day, 1K deployments/month. Hello World Deno . serve (( req ) => { return new Response ( " Hello from the edge! " ); }); Deploy with one command: deno install -Agf jsr:@deno/deployctl deployctl deploy --project = my-app main.ts JSON API Deno . serve ( async ( req ) => { const url = new URL ( req . url ); if ( url . pathname === " /api/time " ) { return Response . json ({ time : new Date (). toISOString () }); } if ( url . pathname === " /api/ip " ) { const ip = req . headers . get ( " x-forwarded-for " ) || " unknown " ; return Response . json ({ ip }); } return new Response ( " Not found " , { status : 404 }); }); Key-Value Storage (Built-in) const kv = await Deno . openKv (); // Store data await kv . set ([ " users " , " john " ], { name : " John " , visits : 0 }); // Read data const entry = await kv . get ([ " users " , " john " ]); console . log ( entry . value );
Continue reading on Dev.to Webdev
Opens in a new tab




