Web Apps - Tools and Tips

Published on Sunday, December 20, 2015

After doing some tinkering with Azure Web Apps I thought I would write a quick post outlining some quick tips. This will be mostly related to NodeJS as that was the platform I was working with.

Kudu

Kudu is the open source platform that powers deployments, configuration, logging, and extensions for Azure Web Apps. You can access it via a link in the tools menu of the new portal or by adding ".scm." in the middle of your URL.

yoursite.scm.azurewebsites.net

Some of the tasks that I use Kudu for:

  • Browsing and editing files on the site
  • Command Line (CMD or PowerShell)
  • Checking Environment Variables
  • Streaming Logs

Visual Studio Online [VSO]

Not to be confused with TFS-as-a-Service which has now been renamed to Visual Studio Team Services (VSTS), VSO is an online, web-based, programming IDE. You can install it on your site using Site Extensions either through the portal or Kudu. If this tool reminds you of Visual Studio Code it is because they use the same underlying JavaScript visual engine.

Once you setup the extension you can access VSO by adding /dev to the Kudu sub-domain.

your site.scm.azurewebsites.net**/dev**

For the project that I was working on I did not bother installing/upgrading different versions of Node and NPM on my machine but rather created a development site and used VSO for editing.

Some of the tasks I use VSO for:

  • File editing and debugging
  • Committing changes to the Git repository
  • Running commands (NPM, Git, static site gen)

iisnode.yml

This is the configuration file for the IIS Node module. This file complements the normal web.config with node-specific settings. Normally you would configure items like "node_env" in this file rather than the web.config so it can be easily checked into source control and maintain more human-readability. The web.config file will be generated by the Kudu deployment process when you sync changes, so most of the time there is no need to add it to the Git repo.

Occasionally you will find a node project, like Ghost Blog, where the log output will not be picked up by the normal log streaming feature of Azure Web Apps. In this instance I have added entries to iisnode.yml to enable alternate logging directly from IIS Node.

Here is an example iisnode.yaml file

node_env: production 
loggingEnabled: true 
logDirectory: iisnode

This example config file gives a description of the possible settings.

I hope some of this information proves useful, I may be adding some tips as I write out further blog posts so check back for more later on.

Thanks for reading.