
Val Town Is Free — Write and Deploy API Endpoints From Your Browser
Serverless Functions Without the Server Setup Val Town lets you write JavaScript/TypeScript functions in your browser and instantly get an HTTP endpoint. No deployment, no hosting, no configuration. Free tier: unlimited vals, 10 runs/second. Hello World Go to val.town, create an account, and write: export default function ( req : Request ) { return Response . json ({ message : " Hello from Val Town! " , time : new Date (). toISOString () }); } You instantly get a URL like https://username-funcname.web.val.run that works. Build a Webhook Handler export default async function ( req : Request ) { if ( req . method !== " POST " ) return new Response ( " POST only " , { status : 405 }); const body = await req . json (); // Process webhook console . log ( " Received: " , body ); // Forward to Telegram await fetch ( `https://api.telegram.org/bot ${ Deno . env . get ( " TG_TOKEN " )} /sendMessage` , { method : " POST " , headers : { " Content-Type " : " application/json " }, body : JSON . stri
Continue reading on Dev.to Tutorial
Opens in a new tab




