All hands-on labs

Free Hands-on labbeginnerAzure

Add a serverless API to an Azure Static Web App

Extend an Azure Static Web App with an authenticated serverless backend. Build a Node.js Azure Function, protect the frontend and API routes with Static Web Apps authentication, deploy them together, and verify that the API identifies the signed-in user.

  • 9 guided tasks
  • Capture the flag

Scenario

A sample cloud operations dashboard is hosted in Azure Static Web Apps. Its frontend is online and requires company sign-in, but static browser code cannot safely handle live operational data.

Add a small serverless API behind the existing authentication boundary. Start with a health endpoint that identifies its caller and returns a JSON response.

- Your Manager

What you will learn

  • Identify the boundary between a static frontend and a server-side API
  • Create an HTTP-triggered Azure Function with the Node.js v4 programming model
  • Protect application and API routes with Static Web Apps authentication
  • Deploy a frontend and managed Functions API as one Static Web Apps release from your own terminal
  • Read authenticated user data inside an Azure Function
Hands-on lab

Add a serverless API to an Azure Static Web App

Free with a Cybr account.