I’m a little lost to deploy my app on noc (planethoster).
I created my node application in planethoster. I transferred my backend to the folder created and installed the dependencies (npm i).
For the front end, I made the build and inserted all the build files in the public_html folder.
When I launch the server, my site is displayed but as soon as I refresh or go to another page, I get a 404 error.I think it’s because express doesn’t send me to the react router so I’ve made this on my server.js but it doesn’t work.
Perhaps someone has a solution?
Thanks a lot !
`app.use(express.static(path.join(__dirname, “public_html”)));
app.get(“*”, function (req, res) {
res.sendFile(path.join(__dirname, “public_html”, “index.html”));
});`