In the previous chapter, the built-in Node.js server in Dialogflow was used to create a Fortune Cookie Webhook that responds to the user inquiries. In this chapter, you will learn how to deploy Node.js webhook code to the Microsoft Azure cloud. Traditionally, to build a server to deploy web application code required extensive knowledge of networking and server hardware. However, Microsoft Azure makes it very easy to build a virtual server with a click of a button, bypassing the need to build a physical server and set up complex networking. This chapter will cover various Microsoft Azure offerings in order to deploy Node.js code and, even as a novice, you will be able to perform complex network administrator tasks as if you were an expert. Learning how to use Microsoft Azure will give you a taste of what it's like to create a real-world enterprise-grade Node.js web service. You will also learn how to use Microsoft Azure's NoSQL database, known as Cosmos DB to store author quotes and dynamically query quotes. During the development process, you will learn about securing the Node.js RESTful API for DialogFlow webhooks. Finally, you will test the Fortune Cookie application using the Dialogflow client SDK.
This chapter will cover the following topics:
- Learning about Microsoft Azure
- Hosting the Node.js RESTful API in Microsoft Azure for Dialogflow webhooks
- Using Microsoft Azure Cosmos DB
- Securing the Node.js RESTful API
- Managing Microsoft Azure Cosmos DB and a Node.js service
- Testing Dialogflow using SDK