Skip to content

Instantly share code, notes, and snippets.

@weisjohn
Last active December 22, 2015 09:59
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save weisjohn/6455804 to your computer and use it in GitHub Desktop.
Save weisjohn/6455804 to your computer and use it in GitHub Desktop.
A joke
var chirp = require('twitter')
, _ = require('lodash') // cause underscore is so 2009..
;
module.exports = function(app) {
// bro shortcuts for getting the tweets
app.get('/mah/chirps', function(req, res) {
// closures, like a pro javascript dude
function hollaback(fail, party) {
if (fail || !party) return res.send(500, fail);
res.send(_.cloneDeep(party)); // don't send our only copy
}
chirp.getTweets(hollaback);
});
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment