Make the backend server the final endpoint, so as java has a proxy to request all the static stuff to the webpack-server.
pros: final user always uses one port in prod and dev (8080) artur already mentioned this. We can remove proxy code from frontend.js
cons: need to introduce new java deps (proxy library), and deal with devmode detection to replace spring static handler by a custom handler using the proxy. More complexity in java side.
This option allows to run unit tests in the browser without additional effort.
Live Reloading would be implemented in the Frontend Server, not possible to rely on Webpack. Though Webpack would work nicely in that setup as well.
Make the backend server the final endpoint, so as java has a proxy to request all the static stuff to the webpack-server.
This option allows to run unit tests in the browser without additional effort.
Live Reloading would be implemented in the Frontend Server, not possible to rely on Webpack. Though Webpack would work nicely in that setup as well.
related to #185