I have classic web application rendered on server. I want to create admin panel as single page application in React. I want to server admin panel from https://smyapp.example
Maybe you could use react-router
and its relative basename
parameter which allows you to serve your app from a subdirectory.
basename
is the base URL for all locations. If your app is served from a sub-directory on your server, you’ll want to set this to the sub-directory. A properly formatted basename should have a leading slash, but no trailing slash.
For instance:
See: https://reacttraining.com/react-router/web/api/BrowserRouter/basename-string