How to combine webpack-dev-server with custom node server
Could anyone kindly give guidance to how to configure combining webpack-dev-server in the starter with a custom node server so that all requests will be directed to the custom node server? The webpack documentation doesn't go in depth on using the proxy method.
The custom node server lives on localhost:3001 and webpack-dev-server runs on localhost:3000. Seems like the below is working...
In webpack.dev.js, devServer: { proxy: { '*': 'http://localhost:3001' } } What should be served as index.html by the custom node server?
Thank you in advance.
https://webpack.github.io/docs/webpack-dev-server.html (Combining with an existing server part)
I haven't tried it myself, but https://github.com/angular/universal-starter might help I would love to hear your findings
proxy: {
'**': 'http://localhost:3001'
}
and making calls to http://localhost:3000/someroute worked :)
Closing the issue.