Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

No need to poll with firebase #2

Closed
shashankmehta opened this issue Jun 5, 2015 · 2 comments
Closed

No need to poll with firebase #2

shashankmehta opened this issue Jun 5, 2015 · 2 comments

Comments

@shashankmehta
Copy link

You don't need to poll. HN API uses Firebase. You can use the Firebase JS lib that uses a websocket connection. Firebase has methods to observe a node, like v0/topstories and v0/newstories for changes. See documentation for .on('value', callback) at doc

A simple proof of concept that I made to demonstrate this: jsfiddle
It has detection of change of position of an article in the top 500 list and detection of additions in the new stories list.

@tocttou
Copy link
Owner

tocttou commented Jun 5, 2015

Thanks! Will see.

@tocttou
Copy link
Owner

tocttou commented Jun 14, 2015

Done.

@tocttou tocttou closed this as completed Jun 14, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants