Created by: scisci
Adds HOST and PORT env variables to react app so websocket can use them instead of window.location.
This addresses the issue listed here: https://github.com/facebookincubator/create-react-app/issues/853
This can be tested by adding a .env
file to an app with the following content:
HOST=127.0.0.1
PORT=3000
Then run the app by visiting http://localhost:3000. If you look at the network requests, you will see the websocket is using 127.0.0.1 and not localhost.