title: Is my route set up correct to update json server in react
body: <p>I am trying to update some information in my json server but I still don't seem to reach my end points. Am I setting mu urls correct. I have tried a couple times changing my url. In my mind I thinking I am doing the correct thing. But error messages telling me other wise. I would appreciate any guidance. Thanks in advance.</p>
  <p><strong>Component functions</strong></p>
  <pre><code>  const [author, setAuthor] = useState(&quot;&quot;);
    const [text, setText] = useState(&quot;&quot;);
  
    useEffect(() =&gt; {
      const loadArticleInfo = async () =&gt; {
        try {
          const response = await axios.get(`http://localhost:5000/articles/${id}`)
          setArticleInfo(response.data)
        } catch (err) {
          console.log(err);
        }
      };
      loadArticleInfo();
    }, [id]);
  
    const addUpvote = async () =&gt; {
      const response = await axios.put(`/articles/${id}/upvotes`, {...articleInfo, upvotes: articleInfo.upvotes + 1, });
      const updatedArticle = response.data;
      setArticleInfo(updatedArticle);
    };
  
    const addComment = async () =&gt; {
      const temp_comments = [...articleInfo.comments, {author: author, text: text}];
      console.log(temp_comments, &quot;New Comment&quot;);
      const response = await axios.put(`http://localhost:5000/articles/${id}/comments`, {...articleInfo, comments: temp_comments});
      console.log(response.data)
       setArticleInfo({...articleInfo, comments: response.data});
      setAuthor(&quot;&quot;);
      setText(&quot;&quot;);
  </code></pre>
  <p><strong>Sample JSON</strong></p>
  <pre><code>{
    &quot;articles&quot;: [
      {
        &quot;id&quot;: &quot;2&quot;,
        &quot;name&quot;: &quot;learn-node&quot;,
        &quot;title&quot;: &quot;How to Build a Node Server in 10 Minutes&quot;,
        &quot;content&quot;: [
          &quot;`In this article, .....&quot;
        ],
        &quot;upvotes&quot;: 9,
        &quot;comments&quot;: [
          {
            &quot;author&quot;: &quot;anon&quot;,
            &quot;text&quot;: &quot;Node really changed things for me since I no longer have to master PHP... JS all the way!&quot;
          },
          {
            &quot;author&quot;: &quot;Tester&quot;,
            &quot;text&quot;: &quot;No!!! Not another server!&quot;
          }
     
  </code></pre>