Microsoft Docs

Azure Functions Overview

Azure Functions is a serverless compute service that lets you run event-driven application code without having to explicitly provision or manage infrastructure. You pay only for the time your code runs and can scale automatically from milliseconds to petabytes. Azure Functions allows you to build applications using your preferred language and developer tools, leveraging the power of the cloud without the complexity of managing servers.

Key Concepts

Common Use Cases

Getting Started

You can get started with Azure Functions in several ways:

Tip: Consider using Durable Functions for stateful workflows and complex orchestrations that span multiple function calls.

Code Example (HTTP Trigger - JavaScript)

This example shows a basic HTTP-triggered function written in JavaScript that returns a greeting.

module.exports = async function (context, req) {
    context.log('JavaScript HTTP trigger function processed a request.');

    const name = (req.query.name || (req.body && req.body.name));
    const responseMessage = name
        ? 'Hello, ' + name + '! This HTTP triggered function executed successfully.'
        : 'This HTTP triggered function executed successfully. Pass a name in the query string or in the request body for a personalized response.';

    context.res = {
        status: 200,
        body: responseMessage
    };
};

Learn More