0

Please let me know why i am seeing below error when browsing angular app( version 8), my default app runs on localhost:4200 but i get error when i try to browse in azure, i am using azure app service extension in visual code and deploying through that and i dint see any error while deploying, i read some one mentioning adding port in config would resolve the issue, but it didn't, let me know what i am missing here.

Config file with port number

enter image description here

error in azure log stream

enter image description here

2 Answers 2

1

Azure App service only supports port 80/443. You can do app.listen(process.env.PORT); in your code. I had a similar issue when hosting node app. See here.

Sign up to request clarification or add additional context in comments.

1 Comment

deployment using windows advanced app help, appreciate your help learn.microsoft.com/en-us/azure/app-service/…
1

Build the web application before deploying with the ng build* command. This command will create the dist/project-sample directory containing a transpiled, minified, ready-to-deploy version of your application.

Deploying to an Azure Web App is as simple as right-clicking on the web app in the Azure App Service extension and selecting the “Deploy to Web App” option. The extension will make a suggestion on what to deploy but use the Browse option to select the dist/project-sample folder instead.

Also the default version of Node on the Azure Web App is not the version that you want to use. Luckily, the version of node can be changed with the WEBSITE_NODE_DEFAULT_VERSION with value 10.16.0. environment variable. Navigate to the Application settings section of the Application settings page for your Azure Web App.

For more details, you could refer to this article. BTW, check your web.config with this SO thread.

2 Comments

Thanks for the reply i did all of those but still get the above message, and the web app is listening to localhost:4200
The localhost port is different with azure http port, so you do not need to confuse.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.