title: Angular $http service not calling express route
body: <p>This is my angular method that would try to send http get request to local server</p>
  
  <pre><code>  $scope.getMeth = function(){
              // Simple GET request example:
      $http({
        method: 'GET',
        url: 'http://127.0.0.1:9876/'
      }).then(function successCallback(response) {
        // this callback will be called asynchronously
        // when the response is available
        $scope.serverResponse = response.status;
      }, function errorCallback(response) {
        // called asynchronously if an error occurs
        // or server returns response with an error status.
        //console.log(response);
        $scope.serverResponse = response.status;
      });
  </code></pre>
  
  <p>And this is the server code using express</p>
  
  <pre><code>var http = require('http');
  var fs = require('fs');
  var express = require('express');
  var app = express();
  
  app.get('/', function(req, res) {
      if (req) {
          console.log(req.url);
          res.send('hello');
      } else {
          console.log('waiting');
      }
  
  });
  
  app.listen(9876, function() {
      console.log('Example app listening on port 9876!');
  });
  </code></pre>
  
  <p>I always get error response and -1 status code, what is wrong here?</p>