Azure Functions is a serverless computing service running on Azure’s cloud-hosted execution environment. Azure Functions lets us run auto-scaled, event-triggered code on an abstracted underlying hosting environment. An everyday use case scenario for Azure Functions is to perform work in response to an event and when that work can be completed quickly, typically in seconds. The on-demand execution feature makes Azure Functions a suitable candidate for developing REST APIs. This article will create a stateless HTTP triggered RESTful Azure Functions app with Node.js to perform read operations on an Azure PostgreSQL database and return the results as a JSON object. We will look at developing a REST-style Azure Functions app using Azure Portal and Kudu.

Disclaimer and Terms of use

Please read our terms of use before proceeding with this article.

Prerequisites

1. An active Microsoft Azure subscription

2. Azure Database for PostgreSQL

Let’s begin by creating an Azure Function App. Sign in to the Azure Portal, and create a Node.js function app.

Image for post

#azure-functions #nodejs #kudu #rest-api #postgresql

How to Build a REST API for Azure PostgreSQL using Azure Functions with Node.js
23.75 GEEK