Search code examples
node.jsazureazure-web-app-serviceazure-app-service-envrmnt

Can I deploy node.js on Azure node app server by just copying files?


Azure websites now has the option to set up a node.js server. The Microsoft documentation on deployment has some rather complicated steps involving PowerShell scripts.

Can I deploy my app by just copying everything including the node modules in my current folder over, and just leaving the following files on the server alone:

  1. web.config
  2. iisnode.yml
  3. azuredeploy.json

Solution

  • Yes, you absolutely can. What makes up your Azure Web App is the set of files that end up in your wwwroot folder, regardless of how they end up there: git deployment, FTP, drag and drop from Kudu Console, ...

    For Node, minimally you're going to need web.config, iisnode.yml and your server.js. You do not need azuredeploy.json, which is an ARM template used client side that doesn't need to be deployed to the server.