title: Express.js delete request
body: <p>Making a MERN-stack app but the delete request function is not working.<br>
  This is the relevant code</p>
  
  <p>When trying to send a delete request with Postman this error shows.
  I search through some other StackOverflow questions but can't find an answer.
  In my previous express applications, it has worked like a charm.</p>
  
  <p>Cannot DELTE /api/todos</p>
  
  <pre class="lang-html prettyprint-override"><code>&lt;!DOCTYPE html&gt;
  &lt;html lang="en"&gt;
  
  &lt;head&gt;
      &lt;meta charset="utf-8"&gt;
      &lt;title&gt;Error&lt;/title&gt;
  &lt;/head&gt;
  
  &lt;body&gt;
      &lt;!--This is the error --&gt;
      &lt;pre&gt;Cannot DELETE /api/todos&lt;/pre&gt;
      &lt;!--This is the error ^ --&gt;
  &lt;/body&gt;
  
  &lt;/html&gt;
  </code></pre>
  
  <p>Todos.js</p>
  
  <pre class="lang-js prettyprint-override"><code>
    const express = require('express');
    const uuid = require('uuid');
    const router = express.Router();
    const todos = require('../../Todo');
  
    router.get('/', (req, res) =&gt; {
        res.json(todos);
    });
  
    router.get('/:id', (req, res) =&gt; {
      const found = todos.some(todo =&gt; todo.id === req.params.id);
  
      if (!found) {
        res.status(400).json({ msg: `No meber whit id of ${req.params.id}` });
      } else {
        res.json(todos.filter(todo =&gt; todo.id === req.params.id));
      }
    });
  
    router.post('/', (req, res) =&gt; {
      const newEntry = {
        id: uuid.v4(),
        title: req.body.title,
        completed: false,
      };
  
      if (!req.body.title) {
        res.status(400).json({ msg: `Pleas include title` });
      }
  
      todos.push(newEntry);
      res.json(todos);
    });
  
    router.delete('/:id', (req, res) =&gt; {
      const found = todos.some(todo =&gt; todo.id === req.params.id);
  
      if (!found) {
        res.status(400).json({ msg: `No meber whit id of ${req.params.id}` });
      } else {
        todos.filter(todo =&gt; todo.id !== req.params.id);
        res.json(todos);
      }
    });
  
    module.exports = router;
  
  </code></pre>