title: mysqldatabase is not reflecting post request in Postman
body: <p>I want to connect myback-end folder with mysql database on localhost using npm package knex with mysql.</p>
  <p>Steps:</p>
  <ol>
  <li>Run nodemon server.js file in the backend project folder (that has knex and mysql)</li>
  <li>In Postman, I do:</li>
  </ol>
  <p>Open Postman, select Post Requst, copy URL: localhost:3000/mypath, copy into body:</p>
  <p>{
  &quot;email&quot;:&quot;me@gmail.com&quot;,
  &quot;password&quot;:&quot;Bananas&quot;,
  &quot;name&quot;:&quot;Test&quot;
  }</p>
  <ol start="3">
  <li><p>Click Send</p>
  </li>
  <li><p>When I open database, run the query: &quot;SELECT * FROM users;&quot; - I don't see any data there.</p>
  </li>
  </ol>
  <p>Do you know what might be going?</p>
  <p>here is the code in server.js file:</p>
  <pre><code>const express = require('express');
  const db = require('knex') ({
  client: 'mysql',
  connection: {
   host: '127.0.0.1',
   user: 'root',
   password: 'root',
   database: 'mydatabase'
  }
  </code></pre>
  <p>});</p>
  <pre><code>const app = express();
  app.use(express.json());
  
  const database = {
   users: [
    {
      id: '123',
      name: 'John',
      email: 'john@gmail.com',
      password: 'cookies'
      },
    {
     id: '124',
     name: 'Sally',
     email: 'sally@gmail.com',
     password: 'cake', 
     }
    ]
  }
  
  app.get('/',(req,res) =&gt; {
  res.send(database.users);
  </code></pre>
  <p>})</p>
  <pre><code>app.post('/mypath', (req,res) =&gt; {
  const {email, name, password} = req.body;
  db('users').insert({
  name: name,
  email: email,
  password: password
  }).then (console.log(req.body))
     res.json(database.users);
  })
  
  app.listen(3000, () =&gt; {
    console.log('app is running on port 3000');
  })
  </code></pre>
  <p>For some reason, I get the error: &quot;node:13376 UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of async function without a catch block, or by rejecting a promise which was not handled with .catch(). DeprecationWarning: Unhandled promise rejections are deprecated.&quot;</p>