title: Using Express.JS to consume an API
body: <pre><code>var express = require('express');
  var app = express();
  var path = require('path');
  var api = require('./api');
  
  
  app.get('/', function(req, res){
  res.sendFile(path.join(__dirname + '/index.html'));
  })
  
  
  app.listen(8080)
  console.log('Server Running');
  </code></pre>
  
  <p>I know that we are requiring the express module. We are using the express function, we are requiring the module path and storing the reference in variable path and doing the same with api but beyond that I am a little lost. If I wanted to connect to twitter API how would I go about doing this? Can someone please explain the logic behind it so i can go learn this better and apply it by myself with different API's? I sincerely and greatly appreciate all of your help!</p>