This is a simple node backend APP that provides twitter API oauth 1.1 functionality by exposing the following 2 routes:
- https://bunnybackend.herokuapp.com/get-feed?lat=[latitude]&lon=[longitude]
- https://bunnybackend.herokuapp.com/post-tweet?video=[video]&comment=[comment]
to be consumed by the bunny challenge frontend app.
The App makes use of simple Node/Express boilerplate, with the folllowing libraries:
- BLUEBIRD for advanced promises functionalities.
- CORS to enable headers management for cross domain API requests.
- LODASH for convenient javascript object manipulation.
- NODE-TWITTER-API and TWITTER as two libraries for twitter connection. Libraries' functionalities partially overlap, both are included since their functionings do not clash, and flexibility was a priority for rapid prototypization.
$ git clone [REPOSITORY]
$ (sudo) npm install
$ node index
Or, if heroku toolbelt is installed:
$ heroku local web
https://github.com/chrisharrington/node-twitter-sign-in-example