electricitymaps / bloom-contrib

Making carbon footprint data available to everyone.
https://www.bloomclimate.com
MIT License
434 stars 104 forks source link

Playground assumes 'localhost', which might not always be posible. #351

Closed steren closed 4 years ago

steren commented 4 years ago

I am developing in an online IDE GitPod, where each open port is served over a secure URL. E.g. when I start a server listening on 3000, I can access it at a URL that looks like https://3000-hash.ws-us02.gitpod.io/.

The problem is that http://localhost:3000 seems to be hardcoded in a few places in the client and server code of the playground. This prevents the use of any other domain for development and testing.

Of course, most developers will develop on a local machine and not hit this problem, so probably low priority.

steren commented 4 years ago

Note that I assume the problem would also occur on my local machine running ChromeOS: when starting a server, I can access it in my browser at a URL like http://penguin.termina.linux.test:3000/.