eanplatter/enclave

Server friendliness

alex-dixon opened this issue · 2 comments

Webpack suggests using a proxy to handle requests between a node server with a REST API, db connection etc. and a hmr/live reload server. That can be complicated to set up but imho it's even more difficult to work with and deploy from. Browserify hmr does work under its covers to allow a node server to serve an html file with a hot reloadable bundle. Since the node server is serving the file and no express server is involved no proxy is required. You can just point your browser to the endpoint of the file you want hot reloaded and it works. I prefer Webpack over browserify but I think this feature is important. I'm not sure whether it would be possible with Webpack but I'm willing to look into it if you'd consider a PR for this feature.

Hey Alex, I'd be interested to see what this looks like, and how it affects the API, if we can do it without adding too much complexit I think it would be a valuable addition.

@alex-dixon If you'd like to make a PR to show what you think this might look like I'd be happy to consider it!

Gonna close this issue for now.