Open BillySwaggyKidy opened 2 years ago
@BillySwaggyKidy webpack server
compiler should handle just the file with serverRenderer
(as entry), not the file running Express. Check out the examples folder
But what if I want to implement some express routers on my backend? Your exemple explain the possibility to use a custom serverRenderer function to render the App component but don't seem to explain about the custom routes for express. I can only render a component but I cannot create a real custom express server that handle get and post request with your example.
Here are my code (server.js):
My dev webpack config (webpack.conf.dev.js:
I think it might be a problem with webpack-dev-middleware and webpack-hot-server-middleware conflict, there are in a loop. The script run and the server is starting and we run again the script to create another server but the port is already taken.
Please send some help, I have been stuck for days. Otherwise, your module is great!