andrewcbass / redistwitter2

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Twitter Stream: Express API

Install

Install Process manager:

 npm install pm2 -g

Install all dependencies:

    npm install

Config

Edit config.js and use your own credentials on twitter and redis, and keyword.

  1. You have to be Register on twitter and then create an app, after that you will get you consumer and access token keys and secrets. More info on Access tokens

  2. Keyword (default is #sxsw)

  3. Redis server credentials (Default config is local)

Usage

pm2 start pm2.json

It will run two process, one with the worker, and another with Express running on port 3000 serving data.

Point your browser:

Deploy to Heroku

  1. Go and get a free account on Heroku
  2. Please create an app with rediscloud service on dashboard.
  3. Set your own credentials on heroku env vars on dashboard, look config.js
  4. Setup your git remote pointing to heroku app: git remote add heroku git@heroku.com:{heroku-app-name}.git

To deploy On branch master and on git clone root dir:

git subtree push --prefix twitter-stream/express-api/ heroku master

Worker dont start until:

heroku ps:scale worker=1

Help

Using PM2 command line

About


Languages

Language:JavaScript 100.0%