# @azure/functions

> Microsoft Azure Functions NodeJS Framework

Latest version **4.16.2** (published 2026-07-08) · MIT license · 0 weekly downloads

## Install

```sh
npm install @azure/functions
pnpm add @azure/functions
yarn add @azure/functions
bun add @azure/functions
```

## Health

**Score 65/100 (B)** — status: active.

Positive: has types; no vulnerabilities; recently updated; high maintenance score; high quality score.

Warnings: low downloads; no esm support.

## Facts

| | |
|---|---|
| Version | 4.16.2 |
| Published | 2026-07-08 |
| First published | 2019-01-10 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | CommonJS |
| Node | >=20.0 |
| Dependencies | 2 |
| Unpacked size | 777 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 70 |
| Author | Microsoft |
| Maintainers | pgopa, paulbatum, facavalcante, ahmelsayed, mahoeger, anatolib, gaaguiar, victoriahall, microsoft-oss-releases, azure-sdk, swapnilnagar, microsoft1es |
| Keywords | azure, azure-functions, serverless, typescript |

## Links

- npm: https://www.npmjs.com/package/@azure/functions
- Repository: https://github.com/Azure/azure-functions-nodejs-library
- Issues: https://github.com/Azure/azure-functions-nodejs-library/issues
- npm.io page: https://npm.io/package/@azure/functions

## Dependencies (2)

- [cookie](https://npm.io/package/cookie.md) ^0.7.0
- [@azure/functions-extensions-base](https://npm.io/package/@azure/functions-extensions-base.md) 0.3.0

## Alternatives

- [@openai/codex-sdk](https://npm.io/package/@openai/codex-sdk.md) — 731.4K weekly downloads
- [babel-plugin-transform-react-jsx](https://npm.io/package/babel-plugin-transform-react-jsx.md) — 565.0K weekly downloads
- [babel-helper-remove-or-void](https://npm.io/package/babel-helper-remove-or-void.md) — 508.5K weekly downloads
- [@pnpm/store-controller-types](https://npm.io/package/@pnpm/store-controller-types.md) — 186.9K weekly downloads
- [react-native-signature-canvas](https://npm.io/package/react-native-signature-canvas.md) — 155.6K weekly downloads

## Recent versions

- 4.16.2 (latest) — 2026-07-08
- 4.16.0-preview (preview) — 2026-05-29
- 4.11.1 (next) — 2026-02-03
- 3.6.0 — 2026-07-06
- 4.16.1 — 2026-06-17
- 3.5.2 — 2026-06-17
- 4.16.0 — 2026-05-21
- 4.15.0 — 2026-05-19
- 4.15.1-preview — 2026-05-15
- 4.15.0-preview — 2026-05-13
- 4.14.0 — 2026-04-23
- 4.13.0 — 2026-04-20
- 4.12.0 — 2026-03-24
- 4.11.2 — 2026-02-06
- 4.12.0-preview.2 — 2026-02-05
- … 68 more at https://npm.io/package/@azure/functions/versions

## README

# Azure Functions Node.js Programming Model

|Branch|Status|Support level|Node.js Versions|
|---|---|---|---|
|v4.x (default)|[![Build Status](https://img.shields.io/azure-devops/build/azfunc/public/514/v4.x)](https://azfunc.visualstudio.com/public/_build/latest?definitionId=514&branchName=v4.x) [![Test Status](https://img.shields.io/azure-devops/tests/azfunc/public/514/v4.x?compact_message)](https://azfunc.visualstudio.com/public/_build/latest?definitionId=514&branchName=v4.x)|GA|24, 22|
|v3.x|[![Build Status](https://img.shields.io/azure-devops/build/azfunc/public/514/v3.x)](https://azfunc.visualstudio.com/public/_build/latest?definitionId=514&branchName=v3.x) [![Test Status](https://img.shields.io/azure-devops/tests/azfunc/public/514/v3.x?compact_message)](https://azfunc.visualstudio.com/public/_build/latest?definitionId=514&branchName=v3.x)|GA|24, 22|

## Install

```bash
npm install @azure/functions
```

## Documentation

- [Azure Functions JavaScript Developer Guide](https://learn.microsoft.com/azure/azure-functions/functions-reference-node?pivots=nodejs-model-v4)
- [Upgrade guide from v3 to v4](https://learn.microsoft.com/azure/azure-functions/functions-node-upgrade-v4)
- [Create your first TypeScript function](https://docs.microsoft.com/azure/azure-functions/create-first-function-vs-code-typescript?pivots=nodejs-model-v4)
- [Create your first JavaScript function](https://docs.microsoft.com/azure/azure-functions/create-first-function-vs-code-node?pivots=nodejs-model-v4)

## Considerations

- The Node.js "programming model" shouldn't be confused with the Azure Functions "runtime".
  - _**Programming model**_: Defines how you author your code and is specific to JavaScript and TypeScript.
  - _**Runtime**_: Defines underlying behavior of Azure Functions and is shared across all languages.
- The programming model version is strictly tied to the version of the [`@azure/functions`](https://www.npmjs.com/package/@azure/functions) npm package, and is versioned independently of the [runtime](https://learn.microsoft.com/azure/azure-functions/functions-versions?pivots=programming-language-javascript). Both the runtime and the programming model use "4" as their latest major version, but that is purely a coincidence.
- You can't mix the v3 and v4 programming models in the same function app. As soon as you register one v4 function in your app, any v3 functions registered in _function.json_ files are ignored.

## Usage

### TypeScript

```typescript
import { app, HttpRequest, HttpResponseInit, InvocationContext } from "@azure/functions";

export async function httpTrigger1(request: HttpRequest, context: InvocationContext): Promise<HttpResponseInit> {
    context.log(`Http function processed request for url "${request.url}"`);

    const name = request.query.get('name') || await request.text() || 'world';

    return { body: `Hello, ${name}!` };
};

app.http('httpTrigger1', {
    methods: ['GET', 'POST'],
    authLevel: 'anonymous',
    handler: httpTrigger1
});
```

### JavaScript

```javascript
const { app } = require('@azure/functions');

app.http('httpTrigger1', {
    methods: ['GET', 'POST'],
    authLevel: 'anonymous',
    handler: async (request, context) => {
        context.log(`Http function processed request for url "${request.url}"`);

        const name = request.query.get('name') || await request.text() || 'world';

        return { body: `Hello, ${name}!` };
    }
});
```

---
_Source: https://npm.io/package/@azure/functions · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
