title: Nodejs, sent post insert values to database but after this, browser waiting for locahost.
body: <p>Trying insert value to mysql database, so far I can insert values, but after insert, browser have infinite loop with "Waiting for localhost". I was trying to close connection - con.end(); but this does not solve issue.  </p>
  
  <pre><code>app.post('/insert', function(req, res) {
    currentdate = req.body.date;
    weight = req.body.weight;
    console.log("Connected!");
    var sql = "INSERT INTO WEIGHT_LOG (DATE, WEIGHT) VALUES ('" + currentdate + "', '" + weight + "')";
    con.query(sql, function(err, result) {
      if (err) throw err;
      console.log(sql);
      console.log("1 record inserted");
    });
  });
  </code></pre>