Ask coding questions

← Back to all posts
I'm getting a "Failed to load resource: net::ERR_CONNECTION_REFUSED" error when using my app.
KorenEzri (0)

This url-shortener works with an NPM package that is node.js server that runs on localhost port 3001, and serves as a "database" (this is for a school project - this is the only database allowed).

The main server that accepts url-shortening requests is a localhost server on port 3000.

I use the NPM module "Concurrently" to run both of them in parallel, and make Axios requests between them.

I have enabled CORs on both backend and front end. I'm not sure why I'm getting this error.

The backend that serves as a "database" is in the node_modules folder, that is actually unavailable here in Replit -- could that be the reason it doesn't work? If so, is there a way to get that folder?