4.4.0 • Published 26 days ago

@azure/functions v4.4.0

Weekly downloads
40,087
License
MIT
Repository
github
Last release
26 days ago

Azure Functions Node.js Programming Model

BranchStatusSupport levelNode.js Versions
v4.x (default)Build Status Test StatusGA20, 18
v3.xBuild Status Test StatusGA20, 18, 16, 14

Version 4 is Generally Available! 🎉✨ Read our blog post and let us know what you think by reacting or commenting on our GA discussion thread

Install

npm install @azure/functions

Documentation

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 npm package, and is versioned independently of the runtime. 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

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

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}!` };
    }
});
@nuragic/apollo-server-azure-functionsloguf-server-azure-functions@pixm/pixm-core-lib@everything-registry/sub-chunk-107@vjeko.com/azure-func@vjeko.com/azure-func-test@types/azure-function-log-interceptdurable-functionsfunctionappfuntion-generator-template@anthonychu/azure-functions-test-utils@anzp/azure-function-multipart@as-integrations/azure-functionsgei-stripegei-users@yeseh/induct-corefast-furniture-util@aaavang/azure-functions-auth@whatwg-http-server/azure-functions@aaronpowell/azure-functions-nodejs-openapianthony-and-alicya-domain@azure/monitor-opentelemetrymods-servermods-server-sdkmods-server-sdk-simulatormods-server-sdk-test@dbc-tech/actionstep-auth-functionhypercomb-validationcds.email-subscription@devprotocol/khaos-core@devprotocol/khaos-functionsmiddlemenauth-vme-util@bmcl/bmcl-shared-packages@atp-autoteile/tracingazapiazure-functions-decorators-typescriptazure-functions-eventhub-local-devazure-functions-logging@frudisch/azure-function-middleware@flyweight.cloud/az-fn-mocks@flyweight.cloud/openroute@dynatrace/opentelemetry-azure-functionsmurasaki-random-file-generator-clilemon-core-v4-azurehaibun-azure-function-pochaibun-azure-functions-mqtt-poc@byndit/advancedafjovo-frameworkbotbuilder-dialogs-adaptive-runtime-integration-azure-functionsbotbuilder-runtime-integration-azure-functionscorewar-infrastructurecosmos-orm@boostercloud/framework-provider-azure@boostercloud/rocket-file-uploads-azure@boostercloud/rocket-files-provider-azure@bluish/azurenextjs-azure-function@inductjs/core@greguintow/apollo-server-azure-functions@hsl-openmaas/operation-manager@intelicare/router@nammatham/azure-functions@nammatham/trpc-azure-functions@nattyjs/azure-functionstrack-search-functions@nswhp/af-app-insights@nswhp/af-core-moduletriplecheck-repository-cosmosdb-sql@matthieugi/azurefunctionmiddleware@nordicsemiconductor/asset-tracker-cloud-azure@landingexp/apollo-server-azure-functionsservly-azure@openlearning/local-node-eventhub-triggerremix-azure@passive-income/psi-apitrpc-azure-adaptertrpc-azure-functions-adapter@optum/azure-functions-auth@pagopa/handler-kit-azure-funcsidelab-http-exceptions@racy/azure-middleware@restfulhead/azure-functions-openapi-validator@ombori/grid-service-authorizationstorage-web-api@skimp/azure@qstyler/nestjs-azure-func-trigger@pulumi/azureserverless-telegram@senacor/azure-function-middlewareteamsdev-servertafftango-data-processor-service@stryker-mutator/dashboard-badge-api
4.4.0

26 days ago

4.3.0

2 months ago

4.2.0

3 months ago

4.1.0

6 months ago

4.0.0-alpha.13

7 months ago

4.0.0-alpha.12

8 months ago

4.0.1

7 months ago

4.0.0

7 months ago

4.0.0-alpha.11

10 months ago

4.0.0-alpha.10

1 year ago

4.0.0-alpha.9

1 year ago

4.0.0-alpha.8

1 year ago

3.5.1

1 year ago

4.0.0-alpha.7

1 year ago

4.0.0-alpha.5

1 year ago

4.0.0-alpha.6

1 year ago

4.0.0-alpha.4

2 years ago

3.5.0

1 year ago

3.5.0-alpha.5

1 year ago

3.5.0-alpha.4

2 years ago

4.0.0-alpha.3

2 years ago

3.5.0-alpha.3

2 years ago

3.5.0-alpha.1

2 years ago

3.5.0-alpha.2

2 years ago

4.0.0-alpha.1

2 years ago

4.0.0-alpha.2

2 years ago

3.2.0

2 years ago

3.1.0

2 years ago

3.0.0

2 years ago

2.0.0

2 years ago

2.0.0-beta.0

2 years ago

1.2.3

3 years ago

1.2.2

4 years ago

1.2.0

4 years ago

1.0.3

5 years ago

1.0.2-beta2

5 years ago

1.0.2-beta1

5 years ago

1.0.1-beta2

5 years ago

1.0.1-beta1

5 years ago