Koa server #25
Comments
Yeah you're definitely right about that. I've yet to do it successfully so am still searching for the correct way. Maybe I'll spend some quality time with it tomorrow to see how this should be handled, as the server portion of the starter kit needs a lot of TLC. I'll get back to you if I figure anything out. |
So I decided to sort of usurp your When I used webpack for a heavy client and rails for a backend API I used a setup inspired by this example https://github.com/justin808/react-webpack-rails-tutorial I figured I'd pass the info along in case it helped. |
@lifehackett I've started work on a branch (https://github.com/davezuko/react-redux-starter-kit/tree/feature/development-server) that will increase the cohesion between webpack-dev-server and Koa. It will probably still be at least a week before I'm able to merge it into master, but here's what's new so far:
The biggest hurdle I'm facing due to this integration, however, is that there's no easy way to perform non-js imports. Since the application required in the server is not processed with webpack, you lose out not only on those imports but also on things like path aliases. It's really nice having a more convenient development mode, but I'm not sure if the tradeoffs are worth it. |
Closing this since the server is no more. |
I'm fairly new to webpack, but my understanding is you want it to serves up static assets and you would want a second server to handle other types of requests. For example if I want to fetch some data
http:localhost:4000/users/1
When you run
npm run dev
it doesn't appear that a second server is being spun up to handle these requests. How would you recommend setting this up in the starter kit ecosystem?Thanks!
The text was updated successfully, but these errors were encountered: