title: Cannot POST from postman nodejs error 500
body: <p>I have set up the server which is working all right, but when I try to create a user by writing the details in Postman as Application/JSON, the server returns:</p>
  
  <pre><code> POST /sign-up 500.
  </code></pre>
  
  <p>I have tried putting utf-8 and it's the same. Changed it to form- urlencoded but then it shows: <code>UnhandledPromiseRejectionWarning: Error: data and salt arguments required</code></p>
  
  <pre><code>const createUser = async (req, res, next) =&gt; {
      const {
        username, 
        email, 
        phonenumber,
        password
      }: {
        username: string,
        email: string,
        phonenumber: string,
        password: string
      } = req.body;
  
  
  const salt = bcrypt.genSaltSync(10);
  const getRounds = bcrypt.getRounds(salt); 
  const passHash = bcrypt.hashSync(password, getRounds);
  
  const createAt = new Date(Date.now());
  
  try {
    const createNewUser = 'INSERT INTO Creations (username, email, phonenumber, password, salt, created_at) VALUES (?,?,?,?,?,?)';
    con.query(createNewUser, [username, email, phonenumber, passHash, salt, createAt], (err, results) =&gt; {
      if (err) {
        console.error(err);
      }
      console.log(results);
    });
  
    res.status(201).send({ success: true, message: 'Created new user', body: {username, email, phonenumber, password} });
  } catch (error) {
    res.status(500).send({ success: false, message: 'Server error' });
  }
  
  await next; }
  </code></pre>
  
  <p><code>mainRouter.post('/sign-up', createUser);</code></p>
  
  <pre><code>app.use(bodyParser.urlencoded({ extended: true }));
  app.use(bodyParser.json({ type: '*/*' }));
  </code></pre>
  
  <p><code>localhost:3002/sign-up</code></p>
  
  <pre><code>{
      "username": "yoshi",
      "email": "atw@gmailcom" ,
      "phonenumber": "somthigna",
      "password": "yesyes"
  }
  </code></pre>
  
  <p>I don't know what the problem can be here, I am trying to solve it for 2 days if anyone can help that would be great!</p>