4 ms·
In the light of this thread https://news.ycombinator.com/item?id=24613610 https://news.ycombinator.com/item?id=24613610 (Stupid solutions: Live server push with
by stanislavb 6y ago
In the light of this thread https://news.ycombinator.com/item?id=24613610 https://news.ycombinator.com/item?id=24613610 (Stupid solutions: Live server push without JS), I'd like to share that I made an "almost no-js" live monitoring service a few days ago. Again with the help of Elixir (and Phoenix LiveView). It tracks everything that's posted on Hacker News and Reddit in "real-time", and distributes it to everyone listening to it. And it tracks the number of online users, too. Of course.
It is "almost no-js" as there are no JS frameworks apart from Phoenix LiveView's integration. All changes are rendered server-side and only the diffs are sent to the client. The only custom JS that's used is for highlighting the monitored keywords and for slicing the list of results so that it doesn't grow indefinitely.