Book Image

Mastering Azure Serverless Computing

By : Lorenzo Barbieri, Massimo Bonanni
Book Image

Mastering Azure Serverless Computing

By: Lorenzo Barbieri, Massimo Bonanni

Overview of this book

Application development has evolved from traditional monolithic app development to using serverless options and microservices. This book is designed to guide you through using Microsoft's Azure Functions to process data, integrate systems, and build simple APIs and microservices. You will discover how to apply serverless computing to speed up deployment and reduce downtime. You'll also explore Azure Functions, including its core functionalities and essential tools, along with understanding how to debug and even customize Azure Functions. In addition to this, the book will take you through how you can effectively implement DevOps and automation in your working environment. Toward the concluding chapters, you'll cover some quick tips, troubleshooting techniques, and real-world serverless use cases that will help you make the most of serverless computing. By the end of this book, you will have gained the skills you need to develop and deliver cost-effective Azure serverless solutions.
Table of Contents (19 chapters)
Free Chapter
1
Section 1: Azure Functions 2.0 Fundamentals
5
Section 2: Azure Functions 2.0 Deployment and Automation
10
Section 3: Serverless Orchestration, API Management, and Event Processing
15
Section 4: Real-World Serverless Use Cases

Azure Functions and JavaScript

You can implement your Azure Functions using JavaScript. The Azure Functions Runtime leverages Node.js to host and run your functions written in JavaScript.

At the time of writing this book, the runtime uses even-numbered Node.js versions (8.11.1 and 10.14.1 are recommended). You can set the Node.js version using the WEBSITE_NODE_DEFAULT_VERSION app settings.

You can retrieve the Node.js version inside any function by using that app's settings or reading the process.version property.

You can create your first function using the Azure Functions Core Tools in the same way you do for a C# function:

  1. The first step you must perform is to create the project that hosts your functions:
func init --worker-runtime node

The following screenshot shows the output of the preceding command:

The --worker-runtime parameter defines the worker runtime you want...