cereallarceny / cra-ssr

[DEPRECATED] Server-side rendering with create-react-app, React Router v4, Helmet, Redux, and Thunk
484 stars 118 forks source link

Changing relative path #62

Closed CallumHemsley closed 5 years ago

CallumHemsley commented 5 years ago

Hello, I know this project is dead, but I'm still using it so was wondering if maybe you knew how to do this. What I basically want is to load the server app from "./dashboard" instead of "./". I've got this working on the CRA side, as well as react-router side on both backend and frontend. However, this isn't working within server.js, where I'm trying to do things assuming im on "./dashboard, not "./".

If you know how to achieve this, please let me know :)

CallumHemsley commented 5 years ago

I managed to fix this simply by doing app.use(express.Router().get("/dashboard", loader)); in server.js