4 ms·
Haha, my version makes a websocket connection to the official Firebase that the HN servers already send everything to, so it is zero extra load on HN
by jerbear4328 1y ago
Haha, my version makes a websocket connection to the official Firebase that the HN servers already send everything to, so it is zero extra load on HN
- lxgr 1y agoThat sounds interesting, are there any public details on this? Is it https://github.com/HackerNews/API https://github.com/HackerNews/API ?
- rahimnathwani 1y agoYou can stream the ID of the most recent item with something like this: curl -N -H "Accept: text/event-stream" "https://hacker-news.firebaseio.com/v0/maxitem.json" Then you will need to iterate through the new item IDs and fetch them, e.g. https://hacker-news.firebaseio.com/v0/item/45534174.json https://hacker-news.firebaseio.com/v0/item/45534174.json
- geuis 1y agoYours is the MUCH better approach. When I did it, no api!