title: Node.js post API is not working with MySQL database?
body: <p>I am trying to make a <strong>post API using Node.js using MySQL database</strong>, API is giving no response only throwing <code>error - code: 204</code></p>
  <p>I am inserting data using <strong>Postman</strong> -</p>
  <pre><code>    {
      
      &quot;articleid&quot;:&quot;1233wawdasyyyd4&quot;,
      &quot;userid&quot;: &quot;123uu&quot;
  } 
  </code></pre>
  <p><strong>In MySQL table there are 4 fields.</strong></p>
  <p><code>id(unique and incrementing) articleid (varchar) userid (varchar) datetime (current timestamp)</code></p>
  <pre><code>   var deletelog = (req, res) =&gt; {
     const articleid = req.body.articleid;
     const userid = req.body.userid;
  
   var sql = `INSERT INTO deletearticles_log  (articleid, userid)
     VALUES ('&quot;+articleid+&quot;', '&quot;+userid+&quot;')`;
  
  connection.query(sql,[articleid, userid], function (error, results, fields) {
      if (error) {
        res.send({
          &quot;code&quot;:400,
          &quot;failed&quot;:&quot;error ocurred&quot;,
          &quot;error&quot;: error
        })
      }else{
        if(results.length &gt;0){
          res.send({
            &quot;code&quot;:200,
            result : results
          });
        }
        else{
          res.send({
            &quot;code&quot;:204,
            &quot;success&quot;:&quot;Record insertion Failed!&quot;
          });
        }
      }
    });
  } 
  </code></pre>
  <p>I don't figured out what's the issue in this code, I appreciate if you could help me, Cheers!!</p>