I've deployed a simple react app to azure app service and it won't start:
How do I get the app to run index.html?
add this command in your azure dashboard > Configuration > Startup Command
pm2 serve /home/site/wwwroot --no-daemon
and restart your server. This fixed it for me!
You don't need to install express and configure index.js as mentioned in other answers since that needs config change and not sure whether app scaling event will retain those installations in new instance.
Easy way is to use pm2 since that is already part of stack. Pass the below startup command for the app
pm2 serve /home/site/wwwroot --no-daemon
Once we restart, it should pick the pages from the docroot (/home/site/wwwroot)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With