Skip to content

Instantly share code, notes, and snippets.

@csbuja
Last active August 29, 2015 14:05
Show Gist options
  • Save csbuja/c521684567429f1e96a6 to your computer and use it in GitHub Desktop.
Save csbuja/c521684567429f1e96a6 to your computer and use it in GitHub Desktop.
Some thing
var express = require('express');
var request = require('request');
var app = express();
var APICALLNAME = 'set this here ... maybe other names I have no idea, nick'
app.get('/'+APICALLNAME, function(req, res) {
request.get({
url: 'twitter apicall url', json:true}, function(error, response, body){
res.json(response); // assuming you're getting json not other stuff like xml or something
});
});
app.listen(process.env.PORT || 4730);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment