Skip to content

Instantly share code, notes, and snippets.

@having-fun-coding
Created May 20, 2015 00:02
Show Gist options
  • Select an option

  • Save having-fun-coding/20948051c48a99faacf2 to your computer and use it in GitHub Desktop.

Select an option

Save having-fun-coding/20948051c48a99faacf2 to your computer and use it in GitHub Desktop.
Real Time Web | Express Server | Code School
var url = require('url');
var request = require('request');
var express = require('express');
var options = {
protocol: "http:",
host: "search.twitter.com",
pathname: '/search.json',
query: {
q: "codeschool"
}
};
var searchURL = url.format(options);
var app = express();
app.get('/', function(req, res) {
request(searchURL).pipe(res);
});
app.listen(8080);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment