Realtime-Pub-Quiz icon indicating copy to clipboard operation
Realtime-Pub-Quiz copied to clipboard

Hardcoded API server address breaks deployment across multiple servers.

Open larsgeb opened this issue 4 years ago • 1 comments

https://github.com/aaron5670/Realtime-Pub-Quiz/blob/a0a0a89dbbabb744a090bc3c9b52c60fa3dff31c/quizzer/src/websocket.js#L15

One line in the websocket.js file still uses a hardcoded server location; localhost. This gave some problems when running the servers on separate machines. I think it is nice to allow one to set this URL from an environment variable. Now, when reading a url from the environment variable, typically it is lead by http://. This needs to be replaced by ws://.

I'll update this in a PR. :wink:

larsgeb avatar Jul 08 '20 14:07 larsgeb