Udemy
    •  
    •  
    •  
    •  
    •  
    •  
    •  
    •  
Turn what you know into an opportunity and reach millions around the world.
Learn More
Your cart is empty.
Keep shopping
Build Node.js Apps: Deploy & Monitor on Azure App Service
Rating: 3.7 out of 5(16 ratings)
134 students

Build Node.js Apps: Deploy & Monitor on Azure App Service

Modernize an existing Node.js web app and deploy it to Azure via App Service.
Last updated 2/2019
English

What you'll learn

  • Explore the flexibility of Azure App Service to configure and scale up your Node .js Web App.
  • Prevent performance issues by monitoring and diagnosing your app with Azure App Service.
  • Perform necessary tests on your refactored Node .js app and deploy it to Azure.
  • Build an application using Node .js and understand what it takes to build cloud-native apps
  • Learn about different Azure architectural building blocks you can use to run Node .js apps on Azure.
  • Use Azure architectural building blocks and integrate CI/CD DevOps pipeline concepts.
  • Understand Azure services such as Azure Web Apps, Azure Container Services, and Cosmos DB and highlight specifics used by Node .js applications.
  • Extend Azure application benefits by integrating with Azure Container Services and Azure Kubernetes Services.
  • Monitor and troubleshoot your application using Azure Application Insights.

Course content

2 sections49 lectures5h 21m total length
  • The Course Overview2:42

    This video will give you an overview about the course.

  • Traditional Web Apps6:32

    Before diving into the process of refactoring, the viewer must understand why we are doing this.

    • Present the downsides of using traditional web apps

    • Present the downsides of traditional hosting

    • Explain horizontal and vertical scale

  • MyToDoListJS App5:48

    We are using a demo application that will be refactored, modernized, and deployed over to Azure. The viewer needs to get acquainted with this app as much as possible.

    • Explain what the app does and present it on the browser

    • Present the tech stack

    • Explain the code

  • Benefits of Azure App Service1:18

    After presenting the downsides of traditional apps along with the benefits of moving to Azure App Service, it’s time for the viewer to get to know Azure App Service.

    • Present App Service’s promotional website

    • Explain the primary benefits

  • First Step –GitHub3:24

    By now, the viewer would want to see some action. It’s time we begin the transition. Before doing anything, we must move the application to a repository and GitHub is the perfect candidate for this.

    • Create a private GitHub repository

    • Explain that private repos are only available to premium members

    • Initialize the local repo and push it to GitHub

  • Creating an Account3:16

    Some viewers may not have an Azure account.

    • Create an account on Azure

    • Explain subscription and the free credits you gain by singing up for a free trial

  • Azure Dashboard4:31

    Viewers must become familiar with Azure’s dashboard.

    • Explain the sidebar and all its choices

    • Pin resources to the dashboard

  • Resource Groups2:14

    Many Azure newcomers make the mistake of not creating resource groups for their projects.

    • Explain the benefits of resource groups

    • Create a resource group

    • Pin it to the resource group dashboard

  • Creating a Database2:52

    Our project needs a database. In our traditional app, we’ve used MySQL. Azure offers MySQL databases.

    • Create a MySQL database on Azure

    • Make sure you add it to the resource group

    • Go back to the dashboard and watch it on the resource group

  • Securing the Database1:41

    Azure databases are open to the outside world by default. We need to secure the database so that it can only be accessed from within Azure.

    • Install a firewall on the database

    • Allow access to Azure and a specific IP range only

  • Connecting to the Database2:07

    Now that the database server is secure, we should connect to it and initialize our database.

    • Connect using MySQL Workbench

    • Install a new database

    • Use utf8mb4 encoding

  • Getting Started with Azure App Service5:51

    The database server is ready. Time to create an Azure App Service app!

    • Create a new service

    • Use the NodeJS default app template

  • App Service Dashboard4:14

    After creating the app service, there will be multiple actions present.

    • Explain the most important parts of the dashboard

  • Setting Up Environmental Variables13:53

    We need to make the the development and deployment process more abstract.

    • Take constants and move them to Application Settings in Azure

    • Remove Contants.js

    • Make sure that the migrations keep working

  • ExpressJS and Azure App Service5:40

    If we attempt to deploy to production right now, the frontend cannot be served.

    • Fix the client root

    • Serve the frontend

    • Configure port bindings

  • Preparing the Frontend2:42

    The frontend must be compiled with AOT in order to be served without having to use the ng compiler.

    • Move dev dependencies

    • Compile for production

    • Update npm scripts in package.json accordingly

  • Git Remote Branches1:58

    In the next video we are going to be using a remote branch to deploy to production. However, some viewers may be unfamiliar with remote branches.

    • Introduce remote branches in theory

  • First Deployment with Git4:42

    The time has come for our first deployment.

    • Add an npm start script.

    • Configure deployment credentials on the App Service dashboard.

    • Deploy using the terminal. Inspect the result.

  • Recovering from Errors6:16

    The previous deployment had some hidden errors that we need to address and refactor.

    • Install nodemon

    • Refactor migrations

    • Redeploy using a git remote branch

  • Automatic Deployments3:29

    Deployments with git remote branches are fine. But we can’t have CDI with them. We need automatic deployments.

    • Go to Azure App Service

    • Remove Local Repository from Deployment Configurations

    • Add GitHub to Deployment Configurations

  • Using VSTS4:16

    Visual Studio Team Services provide an alternative to GitHub for CD.

    • Create an Azure DevOps account

    • Remove GitHub from Deployment Configuration

    • Add VSTS for deployment

  • Staging Slots5:00

    Right now, our changes are deployed directly to the master branch and therefore to production. We need to be able to have some tests on our web app before we make it publicly available.

    • Create a staging slot

    • Remove deployment configuration from the production slot

    • Add GitHub as the deployment configuration in the staging slot

  • Full Development Cycle9:29

    We need to show the reason we did all these things. We will fix a bug, deploy it, test it, and then move it over to production.

    • Create a local branch. Fix the delete issue and merge it with the master.

    • Make the necessary refactorings for migrations and sequelize to work on staging.

    • Check staging and swap slots.

  • WebJobs7:35

    We have a cron job that we need to convert into a WebJob supported by Azure.

    • Make the archiver a module

    • Create a manual operations controller and a method for archiving old to-dos

    • Create a WebJob project, call the endpoint, and push to Azure

  • Monitoring for Errors2:52

    We need a quick way to learn about failed requests and internal server errors.

    • Go to the Azure App Service dashboard

    • Pin the Error 5xx section to the dashboard

  • Inspecting Your App's Metrics3:01

    More metrics are available in Azure than just failed requests and 500s.

    • Briefly explain the rest of the metrics

  • Adding Application Insights to Your App8:40

    Azure’s metrics can be enhanced by Application Insights.

    • Explain what the instrumentation key is

    • Install the applicationinsights library and initialize it

    • Track errors and specific events

  • Querying Application Insights1:52

    In the previous video, we set up Application Insights. In this one, we need to use the Application Insights dashboard to retrieve as much info as possible.

    • Demo of the AI dashboard

    • Inspect events

  • Setting Up Alerts5:56

    We need to know when our app is not performing to its optimal level.

    • Go to Application Insights

    • Create a new alert

    • Create an "Email" action group

  • Test Your Knowledge

Requirements

  • No prior knowledge of Azure is required. However, prior basic knowledge of the Node .js framework is expected.

Description

Have you been worrying that your existing web applications aren't good enough to take advantage of the elasticity of the cloud? Or that refactoring them is going to be very difficult? Azure App Service comes to your rescue! Azure App Service is one of the easiest ways to deploy apps to the Cloud. It provides powerful capabilities such as built-in development operations, continuous integration with Visual Studio Online and GitHub, staging and production support, and automatic patching for Azure developers to quickly create web applications. It also enables integration with on-premises or other cloud systems.

This comprehensive 2-in-1 course is concise and appropriate to use Azure building blocks to deploy your Node .js microservice-based apps to the cloud. Initially, you’ll build a sample Node .js application for Azure Cloud. You’ll also understand Azure services such as Azure Web Apps, Azure Container Services, and Cosmos DB and highlight specifics used by Node .js applications. Moving further, you’ll explore the flexibility of Azure App Service to configure and scale up your Node .js Web App. You’ll also perform necessary tests on your refactored Node .js app and deploy it to Azure. Finally, you'll set up and secure a cloud MySQL database for your web app to manage and schedule your server tasks in the background with Azure!

By the end of the course, you’ll build and launch a Node .js application using Web Apps, CosmosDB, and Container Services. Refactor Node .js Web apps and deploy, scale, and monitor them on Azure App Service.

Contents and Overview

This training program includes 2 complete courses, carefully chosen to give you the most comprehensive training possible.

The first course, Modernize Node .js Web Apps with Azure App Service, covers refactoring Node .js Web apps and deploy, scale, and monitor them on Azure App Service. You will benefit from effortless CI/CD configurations and automatic deployments to staging and production environments and will have more streamlined testing and Quality Assurance processes. Also, you will easily scale your app to meet business needs (while monitoring it for errors and usage statistics with ease) through Azure's services. By the end of this course, you will be confident enough to modernize an existing Node .js web app and deploy it to Azure via App Service.

The second course, Microservice Development on Azure: Node .js, covers how to build and deploy apps with Node .js and Microsoft Azure. This course shows you step-by-step how to use Azure Building Blocks to deploy your Node.js microservice-based apps to the cloud. You will start with what cloud-native applications are and their benefits. You will also learn about the crucial reasons for developing a Node .js app and deploying it on Azure. Then you will understand different Azure services, highlight Azure building blocks used by Node .js apps, and deploy your Node .js applications on the Azure Cloud platform. Finally, you will monitor and troubleshoot your Node .js applications with Azure App Insights.

By the end of the course, you will have mastered building an application in Node .js that's based on microservices, deploying it on the Azure Cloud platform, and monitoring and troubleshooting it with Azure App Insights..

By the end of the course, you’ll build an application in Node .js based on microservices, deploy on the Azure Cloud platform: Monitor & troubleshoot with Azure App Insights.

About the Authors

  • Dimitris Loukas is a software engineer currently part of a growing start-up building a revolutionary referral marketing platform with Node .js, Angular, MySQL, Redis, and Docker. He also develops trading software applications using C#, Aurelia, and TypeScript. He is an author at Packt and has developed many video tutorials in C#, .NET Core, and TypeScript. He has worked for two startups in the past, is active in the open-source community, and loves taking up small side-projects. He has developed microservices using C# and Node .js and has also mastered Angular, Aurelia, and Vue .JS. He is an early adopter of .NET Core and is fascinated by modern JavaScript and where the web is going.

  • Peter De Tender is the CEO and Lead Technical Trainer at PDTIT and 007FFF Learning, a Microsoft Cloud Platform Architect, an extremely passionate trainer and speaker, Azure MVP (2013-2018), Microsoft Certified Trainer (MCT), and a technical writer. After starting his career in 1996, Peter has never looked back from Microsoft infrastructure technologies. At present, he’s an expert on Azure and Azure Stack, coaching global Microsoft Partners, larger Microsoft customers, and Microsoft FTE teams all over the World so they can achieve more with Azure. While this got him a position as FTE for Microsoft Corp in the global Microsoft AzureCAT GSI (Azure Engineering) team early in 2016, his passion for speaking and presenting made him decide to return to his own company after about a year, coming back with an even stronger focus on providing readiness workshops and architect consulting on the Azure platform. He recently published Learning Operations Management Suite with Apress , co-authored the Microsoft Official Curriculum for the 70-535 Architecting Azure Solutions, and is currently writing Azure Governance and Security for Apress, as well as authoring a series of advanced Azure training videos for Packt Publishing. Get in contact with Peter through social media, preferably Twitter @pdtit or @007FFFLearning.

Who this course is for:

  • Application & Node .js Developers who are new to Azure and are interested in learning how to develop and deploy Node .js applications on Azure. Also, want to refactor existing Node .js Web Apps to deploy them to Azure App Service where they can scale, test, and monitor them.