How to make a fetch POST request in a React app with a React Router (wouter)

I am trying to reach my server, but I’m starting to think the app is trying to use the React Router to search for my request. I’m using wouter as the React router. When I use the following code in a React app, I get a 404 Error.

const response = await fetch("/dog", {
      method: 'POST',
      headers: {
        'Content-Type': 'application/json',
      },
      body: JSON.stringify({ someData: "data" })
    });

This is the response I get:

net::ERR_ABORTED 404 (Not Found)

Here is my server code:

app.post("/dog", (req, res) => {
  console.log("dog");
  res.json({ hello: true })
})

How can I reach the server rather than using the React router to make the request? Thanks.