title: My Axios call is returning a 404 error, React/Express
body: <p>I am using React and Express to try and post an Article to MongoDB after clicking a button.</p>
  
  <pre><code>**server.js**
  
  app.use(express.static("public"));
  
  app.post("/articles/:id", function(request, response){
      console.log(request.body);
  });
  </code></pre>
  
  <p>and </p>
  
  <pre><code>**home.jsx**
  
  addToFavorites = article =&gt; {
      console.log(article);
      this.state.savedArticles.push(article);
      this.setState(this.state.savedArticles);
  
      axios.post("/articles/" + article.id, {
          title: article.title,
          summary: article.summary,
          writer: article.writer,
          date: article.pub_date,
          url: article.link
      })
      .then(function (response) {
          console.log(response);
      })
      .catch(function (error) {
          console.log(error);
      });
  }
  </code></pre>
  
  <p>The console prints out the article so it is not undefined and the call catches the following error :</p>
  
  <pre><code>Error: Request failed with status code 404
      at createError (createError.js:17)
      at settle (settle.js:19)
      at XMLHttpRequest.handleLoad (xhr.js:78)
  </code></pre>
  
  <p>Reading other posts, people have mentioned that the path does not exist, but I'm not sure what that means.</p>
  
  <p>Any help would be greatly appreciated :)</p>
  
  <p>UPDATE :</p>
  
  <p>My main issue was just that I did not run node server.js before yarn start. I am new to React so I did not know that this was important.</p>
  
  <p>Including the proxy in package.json was also important.</p>