Serverless API on Azure

Build and deploy a scalable, cost-effective API using Azure Functions and other serverless services.

Project Overview

This learning path guides you through the process of developing a serverless API application on Microsoft Azure. You will leverage Azure Functions to host your API endpoints, Azure Cosmos DB for a NoSQL data backend, and Azure API Management for robust API governance and security.

By the end of this project, you will be able to:

Key Azure Services

This project primarily utilizes the following Azure services:

Project Steps

Example: Basic HTTP Trigger Function (Node.js)

Here's a simplified example of an HTTP-triggered Azure Function 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 is your serverless API!"
        : "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, /* Defaults to 200 */
        body: responseMessage
    };
};
            

Resources