0

I have a Node.js app with Express as back-end and React for frond-end. I've deployed it into my Azure App Service using Azure DevOps Pipeline and Release where I send the contents of my dist folder. As I've checked the www folder of my App Service, only the files from my dist folder was in there.

However when I load the page, only the loading spinner shows. The network tabs shows a Error: Request failed with status code 404 when I'm trying to access a route. It also shows that all of my chunk.js are loaded.

What am I missing? Should I upload/push all of my app in the App Service or is the files from dist enough?

Cywenyzed
  • 13
  • 4
  • Could you check if the express back-end app is successfully built and included in the dist folder? Was the back-end app started up in the azure app service? Could you share the scripts section in your package.json and also the tasks to build your front end and back end app in your pipeline? You can also check out [this thread](https://stackoverflow.com/questions/63369928/deploy-node-js-server-and-angular-app-to-azure-web-service/63371420#63371420) – Levi Lu-MSFT Jan 12 '21 at 07:08
  • Hi there, so I already managed to fix this by uploading all the application by Zip deployment (including the dist folder) instead of only releasing the dist artifact. However, I think this is unnecessary as the whole application is zipped and released all the time. How do I include the server express in dist folder? I'm currently using webpack for the creation of the dist folder. – Cywenyzed Jan 13 '21 at 08:20
  • @You can try using [copy file task](https://learn.microsoft.com/en-us/azure/devops/pipelines/tasks/utility/copy-files?view=azure-devops&tabs=yaml) to copy the express app build files to dist folder – Levi Lu-MSFT Jan 13 '21 at 08:37

0 Answers0