A very simple Twitter reader. Provides the user with a way to query a number of different topics and shows a self-updating real-time unified feed for the selected topics.
This app runs on node.js using Express and the dust templating engine. For the real-time piece it uses socket.io. On the server side a call to the twitter feed runs at an interval and every time new data comes through, an event is published via socket.io to the listening client. Upon receiving this new data the client adds it to the feed.
For no-JS fallback the page refreshes for every query but keeps the list of previously saved queries in an empty input field.
npm clone https://github.com/adrianocastro/tweader.git
http://localhost:3000on your browser
Build a node.js based app that makes it possible for a user to look up topics on Twitter (via the Twitter API) and have them displayed on the browser in real-time. The user is able to add multiple queries but also remove them. Multiple feeds are merged inline, not split into two separate timelines.
No major constraints on the choice of technology but anything too magical should be avoided.
Aim for modularity, maintainability and readability.
This app runs on Express on top of node.js. It uses the dust templating engine and shares the templates on the client via dustbuster. For real-time communication it uses Socket.io. Additionally, Async is used as a helper utility.
Most of the time spent on building this was around familiarising myself with Socket.io and learning how to best integrate it with Express. Figuring out the best way to share templates between the server and the client was also a key concern and, after some investigating, I chose to go with dust/dustbuster. Lastly, understanding the ins and outs of the Twitter API was also necessary for making this work.
- use sessions to support multiple users
- better error handling
- handle user disconnect by cleaning up after he’s left the building
- better namespacing
- Twitter Search REST API
- Twitter Timeline REST API