F
F
Fannasankh2020-03-10 10:21:00
JavaScript
Fannasankh, 2020-03-10 10:21:00

How to properly set backend addresses in React app for Heroku?

I have a react app and a node.js server which is a rest server on port 5000 and a websocket server on port 7000.
Everything works locally, the application connects to the localhost.
There is a problem on heroku, the rest server works, but only if accessed without specifying a port. It is impossible to connect to the websocket server with or without a port.
How to properly set up such a link?

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question