There are many ways to deploy a react app, such as AWS Amplify and Heroku. I will demonstrate how you can deploy a react app on your own server.
If your routes in react contains parameter in the URL, such as id, you probably need to use this piece of code in the server.js file at the end.
app.get('/*', function(req, res) {
res.sendFile(path.join(__dirname, '../', 'client', 'build', 'index.html'));
});
![](https://s2.save4k.ru/pic/OCau7X--EXU/maxresdefault.jpg)