title: Heroku Node.js App Works Locally but not when deployed
body: <p>I have a MEAN Stack Heroku app that was running just fine. But then I added a new function:</p>
  
  <pre><code>app.get('/userCreated/:id', function(req, res) {
  
  if (req.cookies.userCreated == req.params.id) { 
      res.send(true);
  }
  else {
      res.send(false);
  }
  
  });
  </code></pre>
  
  <p>And now I get a 503 (Service Unavailable) error upon loading the app. Anyone have an idea why this might be?</p>
  
  <p>I'm using Angular and $http.get() to access this Express.js function...</p>
  
  <p>Edit: here is my client side Angular code that is making a call to the server:</p>
  
  <pre><code>var deferred = $q.defer();
  function thisUserCreated(id) {
  $http.get('/userCreated/' + id).success(function(data) {
  deferred.resolve(data);
  // returns boolean indicating whether the current user has the proper cookie
  // saying this user created the given group
  });
  return deferred.promise;
  };
  </code></pre>