Y
Hacker News
new
|
ask
|
show
|
jobs
by
available
3140 days ago
How was the view counter made? It's cool to see it increase in realtime.
3 comments
dkris
3140 days ago
If you are interested here is source code for the blog views.
https://github.com/rauchg/blog-views
link
available
3139 days ago
Thanks! I have actually been looking for some simple examples of ZEIT microservices and this happens to be a very nice one.
link
STRiDEX
3140 days ago
It uses Firebase i think
link
makepanic
3140 days ago
Yes there's an open firebase websocket connection that emits the count.
example payload:
{"t":"d","d":{"b":{"p":"views/2015-pure-ui","d":514866},"a":"d"}}
link
mosselman
3140 days ago
I came here just to compliment the counter. Very cool.
link