Azure Functions Documentation

What are Azure Functions?

Azure Functions is a serverless compute service that enables you to run event-driven code without having to provision or manage infrastructure. Write your code in the language of your choice, connect to any Azure service, and let Azure handle scaling, patching, and high availability.

Quickstart: Create your first function

  1. Install the Azure Functions Core Tools:
    npm i -g azure-functions-core-tools@4 --unsafe-perm true
  2. Create a new function app:
    func init MyFunctionApp --worker-runtime node
  3. Add an HTTP trigger:
    cd MyFunctionApp
    func new --template "HTTP trigger" --name HttpExample
  4. Run locally:
    func start
  5. Deploy to Azure:
    func azure functionapp publish YourFunctionAppName

Key Concepts

  • Triggers: Define how your function is started (e.g., HTTP request, timer, queue message).
  • Bindings: Input and output connections to other services without writing boilerplate code.
  • Plans: Consumption, Premium, and Dedicated (App Service) plans determine scaling and pricing.
  • Durable Functions: Stateful orchestrations for complex workflows.

Resources

Explore more topics: