Example of using docker and node.js to follow a twitter stream.
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
.gitignore
Dockerfile
README.md
env.sample
package.json
streamer.js

README.md

Docker Twitter Streamer Example

This is an example of using the node.js twitter library in a Dockerised app to follow a particular search term.

Prerequisites

  • some twitter application keys
  • docker
  • npm
  • node.js

You need the last two to run this locally outside of Docker.

To Run Locally

node streamer.js <search terms>

where is a single string, eg "apple".

Once started this will being tracking that term and printing the raw json to the console:

tracking terms: apple
{ created_at: 'Mon Nov 23 16:16:19 +0000 2015',
  id: 668825412311449600,
  id_str: '668825412311449600',
  ...

To Build The Docker Container

docker build -t "streamer" .

To Run The Docker Container

docker run -t -i streamer apple

You should shortly see your stream output.