Skip to content
FUNCTIONS

Write a handler.
Get an HTTPS endpoint.

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.

Node.js 24 or Python 3.13 Project variables built in 100,000 requests a month included
FUNCTIONS · LIVE
CLIENTPOST/todosindex.tsNODE 24 · PY 3.13https://api-my-projectpgPROJECT VARSDATABASE_URLREDIS_URLS3_BUCKETRESPONSE201{ "id": 7,"title": "Ship it" }
100,000requests a month included per function, on Free and Pro
5 minlongest request on Pro, 30 seconds on Free
~1 sto start again after 10 minutes without requests
WHAT YOU GET

Everything included.
Nothing to wire up.

TypeScript, JavaScript or Python functions at their own HTTPS address.

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.

Your variables, already set

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.

TypeScript as is

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.

Test in the dashboard

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 from anywhere

Deploy a file from your terminal with one curl command, or let an AI editor do it with the deploy_function MCP tool.

Pay per request

An idle function stops and costs nothing. On Pro, past the allowance it is $0.40 per million requests plus request time.

HOW IT WORKS

Three steps
to production.

  1. 01
    Create

    Click Create function on the Function App card. Give it a name and pick TypeScript, JavaScript or Python.

  2. 02
    Write

    Write the handler and list its dependencies in package.json or requirements.txt.

  3. 03
    Deploy

    Click Deploy. In about a minute it answers at https://<name>-<project>.<apps domain>.

Read the Functions guide
index.ts
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);
}
BETTER TOGETHER

One project.
Every service connected.

Same project, same .env, same bill.

FAQ

Questions about
Functions.

Which languages can I use?
TypeScript and JavaScript on Node.js 24, and Python 3.13. A function's runtime is picked when it is created and cannot change later.
What happens when nobody calls it?
After 10 minutes without requests it stops. The next request starts it again in about a second, through a 307 redirect to the same address, with its method and body.
Is the address public?
Yes. Check a token or signature in the handler for anything private, and answer CORS and OPTIONS yourself when browsers call it from another site.
What does it cost?
Each function gets 100,000 requests and 25,000 GB-seconds a month. On Free it stops there until the next month. On Pro, the rest is $0.40 per million requests and $0.012 per 1,000 GB-seconds.

Add Functions to your project.
Free to start.

Postgres, auth, storage, Redis, email and AI models. One API key.