Comments (9)
Thank for spotting this!
Good solution would be to create some endpoint providing config for UI and then creating WebSocket connection based on that.
from erlangpl.
I think that sufficient solution would be to allow users to enter hostname and port number to connect to from UI (which would defualt to localhost:8000 of course). If someone wants to change port number we serve content on, if think they would be fine configuring it in UI. What would you think about that @dgulinobw?
from erlangpl.
An automated way would be cool, but anything that doesn't involve rebuilding would be sufficient.
from erlangpl.
In the old UI we injected WebSocket port number read from the command line argument into the HTML/JS templates before serving them from cowboy to browsers. Is the same possible after React is built, e.g. can we regexp on "8000" and change it to custom port number?
from erlangpl.
Probably yes but it's far from being elegant. And we have also Elm code which can look for port number, we could pass it from React via ports but I don't know. I would go with config endpoint with:
- port number
- current version
from erlangpl.
@dgulinobw is port 8000 conflicting with some service, which is running on many operating systems?
The original intention behind having -P flag was to allow users, who have port 8000 occupied by other processes in the system, to decide which port is most suitable for their setup. I can see two options:
- use port 37575 instead of 8000, hard code it in cowboy/JS/Elm, remove -P flag
- keep the -P flag, let JS/Elm open WebSocket on the same port as the one found in the URL, from which the UI assets were served - @baransu is that possible?
from erlangpl.
I would keep -P flag.
No problem with that. So in production when assets are served by server it will look for port in url and for development it will look for default 8000 when UI is standalone.
from erlangpl.
It seems the port 8000 is a default one for many popular applications like WinAmp and trojans. Maybe it makes sense to have the development port set to 37575.
BTW, try typing on the classic phone with T9 the word "erlpl".
from erlangpl.
So let switch to 37575 by default keeping -P flag.
from erlangpl.
Related Issues (20)
- ERROR: timed out while collecting data from node HOT 4
- OTP 20 + old cowboy + crypto HOT 1
- Crash after connection (possible duplicate) HOT 3
- Cache state in localStorage HOT 4
- Make proper documentation HOT 1
- Add erlangpl to software repositories HOT 2
- Process list based on business
- ETS node view HOT 19
- jsone failing on node info parsing
- Release more often HOT 3
- Add elixir version to Basic Info in default view HOT 3
- Highlight current call module and initial function call in information in supervision tree. HOT 1
- Help tooltips in dashboad system info
- Need erlang 20 for test? HOT 1
- remote node HOT 2
- Cluster node view too busy
- Is this project still alive? HOT 2
- Graph view takes too long
- runtime error HOT 4
- Is this library still alive? HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from erlangpl.