React frontend on netlify can't connect to database - heroku

I have deployed the Node, Express backend API part of my MERN app to Heroku and my MongoDB is running on MongoDB Atlas.
The React frontend when run on localhost connects to the backend on Heroku fine and can retrieve/edit data from MongoDB Atlas.
But when I tried to deploy the same React frontend app on Netlify, the React app works but it can't retrieve data from the database.

I think it is probably because of the IP restrictions on Atlas. You have to allow any IP to connect to your database.

Related

The springbootApp I put on vps is not working

Basically, I purchased a server that has to host a React WebApp and Sprinboot API as a backend server. the react is turning fine on the server but I cannot seem to be able to make the springboot work.
In order to make the React work I had to use nginx , do I need to do the same thing for the Springboot app ? And since the nginx configuration is already devised for the React app how should i modify it to allow it to run both the React and the Springboot.
Here's my nginx configuration:
nginx config file
I tried following several videos but I can't seem to piece together the elements of the solution I'm searching for.

Ideal place to deploy a springboot web backend and a nextjs frontend

I just wanted to know, if someone could suggest me some sites, where i can deploy my springboot backend connected to a mysql database. My frontend is build with nextjs/react.
You can try Render or Heroku if you don't want to operate a whole Kubernetes cluster.

How to host a dockerized Laravel website on Heroku?

I have a dockerized Laravel application that consists of MySQL database and Redis.
I want to deploy and test it on the internet.
is there any way to have an environment such as Heroku to deploy it?

ERR_NAME_NOT_RESOLVED on heroku app

I'm trying to integrate Algolia Search onto my heroku node app. Everything seems to be working fine on my localhost, but after deploying to heroku, all my algolia endpoints seem to return ERR_NAME_NOT_RESOLVED.
Is there anything I can do?

Can I deploy a server to Heroku without a client?

I have built a backend server application without a frontend to it. Can I still deploy it to heroku ?
Sure. Heroku only hosts apps.
As long as your backend server application listens on a specified port, and is able to receive and respond to HTTP requests, you can host it on Heroku.

Resources