Closed nobleach closed 6 years ago
@nobleach I'm not sure I fully understand your question but I'll try and point you in the right direction. render.js
is compiled to build/server.js
which is used as middleware in the express app defined in src/server/index.js. You can see this happening in bin/server.prod.js.
In short, if you'd like to add routes at the express level, the best place to do it would probably be src/server/index.js
.
Hope this helps!
I'm sorry, I communicated it poorly. You answered my question however. I was expecting some sort of app.use()
to declare the middleware explicitly. I do see it in the server.prod
.
No problem, glad I could help clear things up.
This appears to be locked in to one universal route (in Express) All traffic flows through
render.js
What if one wanted to do multiple routes? (not using React router) I'm considering pulling it all apart and playing with it. My app would have to do some configuration on startup - instead of doing all the work on req/res. I just didn't know if you might have some immediate thoughts.