0

I have a nodejs/express application and an atlas mongoDB set up. I can get the data from the database to my app if it is running on local host. When I try and deploy the app as a web app through Azure, it does not work; I click the button to get/display the data but nothing happens. What is causing this issue and how do I fix it?

The_Redhawk
  • 214
  • 1
  • 2
  • 11
  • You can refer to [Deploy a Node.js + MongoDB web app to Azure](https://learn.microsoft.com/en-us/azure/app-service/tutorial-nodejs-mongodb-app), [Can't get data from MongoDB database for web app](https://stackoverflow.com/questions/42498608/cant-get-data-from-mongodb-database-for-web-app) and [Blank Page on load for nodejs web app](https://social.msdn.microsoft.com/Forums/azure/en-US/43a6aeef-c328-4650-933a-80bc7dadf4a2/blank-page-on-load-for-nodejs-web-app?forum=windowsazurewebsitespreview) – Ecstasy Apr 07 '22 at 05:20

1 Answers1

0

I figured out what was wrong. My repository did not include a web.config file at all. Having never worked with web applications or Node before, I did not know this was needed. Once I added the file and put the proper path in, the code began working as intended. I can update this post with actual code if someone wants it.

The_Redhawk
  • 214
  • 1
  • 2
  • 11