title: My NodeJS http POST request to calculate a sum of a json value does't work
body: <p>I'm new to NodeJS, and I'm doing an exercise to calculate the sum of a JSON value I entered in a POST request, but postman gives me an error message</p>
  <blockquote>
  <p>&quot;Cannot POST /add&quot;.</p>
  </blockquote>
  <p>A I missing something? Here is my code:</p>
  <pre><code>const express = require('express');
  const math = require('mathjs');
  var bodyParser = require('body-parser');
  
  const app = express();
  
  const host = &quot;127.0.0.1&quot;
  const port = 3000
  
  app.use(bodyParser.urlencoded({ extended: false }));
  app.use(bodyParser.json());
  
  async function add(tal) {
      let promise = await fetch('http://127.0.0.1:3000/apiServer/add', {
          method: 'POST',
          headers: {
          'Accept': 'application/json',
          'Content-Type': 'application/json'
          },
          body: JSON.stringify(tal) }
      )
      let summa = math.sum(promise);
      return summa;
  }
  
  app.post('apiServer/add', (req, res) =&gt; {
      var tal = req.body.user;  
      res.send(add(tal));
  });
  
  app.listen(port, host, () =&gt; {
      console.log(`The server is running at: http://${host}:${port}`);
  });
  </code></pre>
  <p>POST:</p>
  <pre><code>{    
    &quot;tal&quot;: &quot;10,343,24,345,22,23,233&quot;
  }
  </code></pre>