'Deploy create-react-app with react routing to cpanel

So I am trying to deploy a create-react-app app to cPanel .My biggest issue is having the server respond to a request because all I am getting when refreshing or hitting an endpoint rather than the base URL it returns a 404 error. I understand that its client-side routing but how do i make the server serve the webpage requested using cPanel.



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source