Keith
Keith

Reputation: 2019

How to deploy NodeJS project to Azure websites?

We have a NodeJs project we are building with TeamCity, then using FTP, uploading the built files to our Azure web app (.azurewebsites). The project contains thousands of files, so the FTP upload times are very slow (takes a very long time). We would prefer to package the build as a ZIP file, then upload the ZIP with FTP (much faster). However, how do we unzip the ZIP file on Azure using script?

Or is there a better way to deploy our build to our Azure web app?

NOTES:

Upvotes: 0

Views: 885

Answers (1)

Chris
Chris

Reputation: 5108

You can use the Kudu API or MsBuild to deploy an app (web app or Function) to Azure App service. The deployment is usually done in 2 parts:

  1. Deploy the app service using ARM templates
  2. Deploy the code/App using one of these methods

If you're using VSTS, there are templates for both steps and make it a 2min process to setup. If you're not using VSTS, the Kudu API is he best way to solve the problem.

You can find more information here : https://github.com/projectkudu/kudu/wiki/REST-API

You can also use the Azure PowerShell Management cmdlets to achieve the same. However, this is at the moment only supported on Windows

Upvotes: 2

Related Questions