0

We are developing a single page application using AngularJs having an index file at the root which will be served by web server to client. Backend for this application is a HTTP restful on a different server. Currently when developing this SPA application, we are using Node with express server. We need to deploy this application to azure. There are two deployment options available.

  1. Deploy either as web application on azure (I think its IIS server in this case)
  2. Or deploy on IIS using IIS Node module

We need to have a rewrite rule, which will serve index page for every other request to server in both cases.

Which one is better deployment model? Only IIS or iisnode module with IIS server or if anyone can suggest another option available for SPA on Azure?

Nexus23
  • 6,195
  • 9
  • 50
  • 67

2 Answers2

0

The most straight forward would be to deploy it as an Azure App Service Web App (Previously Azure Website). It supports node and you can do your rewrite rules in web.config system.webServer section.

You can read the Azure App Service "Hello world" on Node here

jakobandersen
  • 1,399
  • 7
  • 9
0

Azure can run Express.js apps out-of-the-box, and has been able to for some time now. You don't need to worry about writing a web.config or anything.

Quick tutorial: Here

Basically, you need to copy the /bin/www file to /server.js, and edit the var app = require('../app'); to read var app = require('./app');

Then run it like any other Azure app.