The backend is comprised of two parts:
- twitterEmoSpider: which connects to the twitter stream and collects data to build the database.
- twitterEmoServer: Once the database is built, the twitterEmoServer connects to the database and serves data on localhost.
Start by setting up the spider and once the database is somewhat populated setup and run the server.
- add exceptions
- add references to original paper
- replace prepare function in tweetServer with projection: https://docs.mongodb.org/manual/reference/method/db.collection.find/
- possibly better way to randomly pick tweets to return:
- if I search for max_results=2 and there's only 1 left it resets the list. it should return that 1 and take whatever is needed from list.
- line for getting latest tweets: lastTweetOnly = posts.find().sort([("created_at", pymongo.DESCENDING)]).limit(1)
- unicode
- mongo db queries
- gunicorn