I have an Angular app (9.1.4) and a node.js server application (12.14.1). My files are currently configured like this:
MyApp
- package.json
- angular.json
- serve
First of all, are the startup ports of your project, front-end angular project and back-end node service in the same configuration file?
If yes, then you can execute multiple commands by modifying the script in the package.json
file.
Because only 443
and 80
ports are supported in azure web app. If the port configuration of the two projects is not the same, it may run normally locally.
For example, the ng project is 7001
, and the server project is 7002
, deployed to the azure web app, according to the process.env.PORT
parameters, it will the port conflicts and the project cannot be started.
So if it is the second case, how to deal with:
You can use virtual applications to deploy your applications separately. For more details, you can see my answer in another post.