title: node js express 3 app.post not working
body: <p>I am having problems when trying to do a post. my app.get works perfectly, but I cannot say the same for the post. This is my server.js</p>
  
  <pre><code>// Express is the web framework 
  var express = require('express');
  var app = express();
  app.use(express.bodyParser());
  app.configure(function () {
    app.use(allowCrossDomain);
  });
  
  app.post('/server/orders',express.bodyParser(), function(req, res) { 
       alert("Estamoooo");
      console.log("POST Order"); 
      var client = mysql.createConnection({
      host     : 'localhost',
      database : "DB",
      user     : 'root',
      password : 'XXXX'
      });
      client.connect(); 
  
  
      var name = req.body.name; 
      var lastname = req.body.lastname; 
      var telephone = req.body.telephone; 
      var address = req.body.address; 
      var queso = req.body.queso; 
      var vainilla = req.body.vainilla; 
      var date = req.body.date;
  
  
      var query = client.query("insert into orden(name,lastname,telephone,address,queso,vainilla,date) values('"  
      + name + "', '" + lastname +"','"+ telephone +"'  , "+ address + ", '" + queso + "', "+ vainilla +", '" + date  
      +"' );"); 
      query.on("end", function (result) { 
          client.end(); 
          res.json(true); 
      }); 
  
   }); 
  </code></pre>
  
  <p>and this is my appjs.js</p>
  
  <pre><code>function addOrder(){ 
      var newOrder = {}; 
      newOrder.name = document.getElementById("nombre").value; 
      newOrder.lastname = document.getElementById("apellido").value; 
      newOrder.telephone = document.getElementById("telefono").value; 
      newOrder.address = document.getElementById("direccion").value; 
      newOrder.queso = document.getElementById("cantidadQueso").value; 
      newOrder.vainilla = document.getElementById("cantidadVainilla").value; 
      newOrder.date = document.getElementById("fecha").value; 
  
      var newOrderJSON = JSON.stringify(newOrder); 
      alert("New Order: " + newOrderJSON);
      $.ajax({
          url : "http://192.168.0.1:8020/server/orders",
          method: 'post',
          data : newOrderJSON,
          contentType: "application/json",
          dataType:"json",
          success : function(data, textStatus, jqXHR){
              alert("Data Added!!!");
          },
          error: function(data, textStatus, jqXHR){
              alert("Data could not be added!");
          }
          }); 
   } 
  </code></pre>
  
  <p>The ajax is not being called. I do not get a response, just nothing happens. It's strange because the get works really great. Thanks!</p>
  
  <p>UPDATE: I do know that the server side works great. The problem is in the appjs code. It is skipping the ajax call.</p>