Web standard handlers
Export a function that takes a Request and returns a Response. Return a string or an object and it is sent as text or JSON. Every method and path calls it.
Write a function in TypeScript, JavaScript or Python, click Deploy, and it is live at its own address in about a minute. Your project's database, Redis and storage keys are already set for it.
TypeScript, JavaScript or Python functions at their own HTTPS address.
Export a function that takes a Request and returns a Response. Return a string or an object and it is sent as text or JSON. Every method and path calls it.
DATABASE_URL, REDIS_URL, the S3_* storage keys, AUTH_* and your own variables are there. They are read on every start, so new keys are picked up.
Node.js 24 runs TypeScript with the types removed, no build step. Python 3.13 takes a handler in main.py. Dependencies install on every deploy.
Edit on the Code & test tab, save and deploy, then send a request from the Test panel and see the status, time and response.
Deploy a file from your terminal with one curl command, or let an AI editor do it with the deploy_function MCP tool.
An idle function stops and costs nothing. On Pro, past the allowance it is $0.40 per million requests plus request time.
Click Create function on the Function App card. Give it a name and pick TypeScript, JavaScript or Python.
Write the handler and list its dependencies in package.json or requirements.txt.
Click Deploy. In about a minute it answers at https://<name>-<project>.<apps domain>.
import pg from "pg";
// Created once per start, and reused by every request.
const pool = new pg.Pool({ connectionString: process.env.DATABASE_URL, max: 5 });
export default async function handler(request: Request): Promise<Response> {
if (request.method === "POST") {
const { title } = await request.json();
const { rows } = await pool.query("insert into todos (title) values ($1) returning *", [title]);
return Response.json(rows[0], { status: 201 });
}
const { rows } = await pool.query("select * from todos order by id desc limit 20");
return Response.json(rows);
}Same project, same .env, same bill.
Postgres, auth, storage, Redis, email and AI models. One API key.