realisation realisation - 1 year ago 111
Node.js Question

AZURE Web Apps: deploying Angular SPA & Node Express server from Github repository

I have a webapp in a Github repository that has an Angular client and a Node Express backend server. I have no idea how to deploy these simultaneously to an Azure webapp. None of the tutorials cover this. The only thing they tell you to do is to have an index.html or a server.js in a root directory, which isn't how my app is structured.

But I did try moving the server to a server.js in the root directory, and then nothing happened there.

I have no idea where to start with this. Thank you very much for any help.

Tell me what more information you need because I have no idea and there is zero documentation for this.

Update: None of this appears to be working. I tried switching the virtual path for

to the dist folder where
lives, but this didn't do anything.

Answer Source

As it seems you also open a thread on MSDN with this issue at

Node.js application on Azure should have an app.js or a server.js in the root of the application.

So Here is a workaround, if you want your angular app in dist folder acts as the frontend of your web application and the expressjs application acts as the backend service.

You can deploy the express js application in the root directory and the angular app folder in the same root directory too. Then you can configure the angular app in the exrepssjs routes. E.G

assume your angular app entrance is index.html in dist folder in root directory:

app.get('/', function(req, res) {


Which will route "/" to your angular app.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download