title: POST request 404 (Not Found) with angular.js and ExpressJS
body: <p>I'm trying to send a request to my ExpressJS server using AngularJS:</p>
  
  <pre><code>angular.module('app').controller('contactCtrl', function($scope, $http) {
      $scope.envoyer = function(nom, organisation, courriel, telephone, message){
          $http.post('/contact', {nom:nom, organisation:organisation, courriel:courriel, telephone:telephone, message:message}).then(function(error, response){
              if(response.data.success){
                  console.log('sent!');
              }
          });
      }
  });
  </code></pre>
  
  <p>This is the code from the server:</p>
  
  <pre><code>var mailer = require('nodemailer');
  
  var EMAIL_ACCOUNT_EMAIL = 'aaa@gmail.com';
  var EMAIL_ACCOUNT_PASSWORD = 'aaa';
  
  var smtpTransport = mailer.createTransport({
      service: "Gmail",
      auth: {
          user: EMAIL_ACCOUNT_EMAIL,
          pass: EMAIL_ACCOUNT_PASSWORD
      }
  });
  
  app.post('/contact', function(req, res, next){
          var success = true;
          var mailOptions = {
              to: 'azez@email.com',
              subject: 'qsdxwccvfd',
              html: 'sqdqsdq'
          };
  
          smtpTransport.sendMail(mailOptions, function(error, res){
              if(error){
                  console.log('[ERROR] Message NOT sent: ', error);
                  success = false;
              } else {
                  console.log('[INFO] Message sent: ' + res.message);
              }
              next(error, success);
          });
  });
  </code></pre>
  
  <p>After the server performs the request, I get this error message on the client side:</p>
  
  <pre><code>POST http://localhost:3002/contact 404 (Not Found) angular.js:8495
  (anonymous function) angular.js:8495
  sendReq angular.js:8291
  $http.serverRequest angular.js:8025
  wrappedCallback angular.js:11498
  wrappedCallback angular.js:11498
  (anonymous function) angular.js:11584
  Scope.$eval angular.js:12608
  Scope.$digest angular.js:12420
  Scope.$apply angular.js:12712
  (anonymous function) angular.js:18980
  jQuery.event.dispatch jquery.js:4409
  elemData.handle
  </code></pre>
  
  <p>I think that it's coming from the fourth line of the AngularJS code, but I wasn't able to find how to fix it. How can I fix that, please?</p>