Anup
Anup

Reputation: 41

How to specify ports to run multiple ReactJS app in Azure web app?

Requirement - One URL(https://.azurewebsites.net) - The index.html page containing 2 links(href) to localhost:xxx1 and localhost:xxx2 - localhosts xxx1 & xxx2 are two different ReactJS apps

Configured package.json as per this post. "PORT=xxx1 ...". But when I click the app1 link after running yarn build in app1's folder the request is timing out. What is it that I am missing?

Upvotes: 0

Views: 414

Answers (1)

David Makogon
David Makogon

Reputation: 71120

Not sure what ports you're choosing but... Azure Web Apps only support ports 80 and 443. If you need additional ports, you'll need to choose something different to host your apps (e.g. containers, vm's), or separate your apps into independent web apps where they can each listen on 80/443.

Note: Multiple web apps can share the same App Service Plan, so there's not necessarily a cost impact to having multiple web apps.

Upvotes: 2

Related Questions