title: Why is req.body undefined?
body: <p>This is my code</p>
  <pre><code>app.post(&quot;/hi&quot;,(req, res)=&gt;{
      const schema = Joi.object({
          name: Joi.string().min(2).required()
      });
      const result=schema.validate(req.body);
      if(result.error){
          res.status(400).send(result.error);
          return;
      }
      console.log(req.body);
  
  
      
  });
  
  const port=process.env.PORT || 3000
  app.listen(port, ()=&gt;{
      console.log(&quot;listening on port &quot;+port );
  
      
  });
  </code></pre>
  <p>It just listens on the localhost on port 3000 and logs the body of the request into the console. When I send any request through Postman, it works fine except it outputs &quot;undefined&quot;. Why is this? Is this a problem with my code or with my usage of Postman?</p>