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

If you are interested here is source code for the blog views. https://github.com/rauchg/blog-views
Thanks! I have actually been looking for some simple examples of ZEIT microservices and this happens to be a very nice one.
It uses Firebase i think
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"}}

I came here just to compliment the counter. Very cool.