I am developing an application using React and Express.js. I define static in React and build my back end using the code below, but when I make a get request, the following error is displayed in the client console. What can I do?
app.get("*", (req, res, next) => {
res.sendFile(path.join(__dirname, "build", "../../build/index.html"));
});
// Backend API router
app.use("/api", router);
Client-side error message
