Deployment Issues: net::ERR_CONNECTION_REFUSED

I have successfully deployed my React front end and Node backend on Render, however I’m not getting any server response.

The full error is
**POST http://localhost:3001/ **

My backend render environment has

  • DB_URL = mongodb+srv://
  • RENDER_APP_URL = https://<site_name>

My frontend render environment has

  • RENDER_APP_URL = https://<site_name>

I have my base url set to

  • baseUrl: process.env.REACT_APP_URL || http://localhost:3001/

I have cors set up and have whitelisted my backend and frontend render urls

I’ve been messing around with different options for a while but no luck getting it to work.

Thanks in advance for your help!

You’re using two different variable names.


My mistake - I do have baseUrl: process.env. RENDER_APP_URL
I must have copied it over wrong.

Any idea what else might be causing the error, given that my render environments and baseUrl are set to RENDER_APP_URL.


Looks like it was a simple error where Create React App require the environment variables to be prefixed with REACT_APP

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.