Azure App Service suddenly delivers file directory overview instead of Angular App

Viewed 650

I have an Azure Web App (WebAppLinux) running an Angular application. The deployment is based on the Azure WebApp@1 task in an Azure pipeline.

Everything was fine until today. Without anyone having done a deployment, the website only shows an index page with the files stored in the home directory.

A re-deployment through the CI/CD pipeline is still successful. However, the error remains.

Was there any change to the Azure App Service that made my application incompatible?

2 Answers

The answer of LuisDev99 in https://stackoverflow.com/a/61707805/3809334 has solved the problem.

We had to add

pm2 serve /home/site/wwwroot --no-daemon --spa

to the Startup Command under Configuration, select the tab -> General Settings

In the past we had a startup script that called npx serve -s within our Angular application.

It seems that this way did not work anymore over the weekend. Maybe because there was a configuration change in the WebApp by Microsoft

Related