hapi-universal-redux
hapi-universal-redux copied to clipboard
Change README
It's about time the README gets it's own style, and stopped copying from react-isomorphic-starterkit.
Hey Luandro, I've been trying to get the change in #94 up and running but I find myself with problems because I don't understand everything that's going on. This isn't as plug and play as it is advertised...for instance...why do I have two servers going up on port 8080? There are technically three servers going up. Can you confirm?
This project is highly based on https://github.com/RickWong/react-isomorphic-starterkit, it's simpler, so you can try to better understand it there.
There are only two servers, the Hapi server and the webpack-dev-server. The npm run watch-server-start command just starts watching the Hapi server for changes. Automatic reloading for both client and server is still very challenging, that's why it's so confusing.
Is it not working out of the box? It definitely should be...
Going through this tutorial right now pasted at the bottom.
My biggest confusion right now is that the "npm run dev" command spins up watch-server and watch-client. Both the webpack.server-watch.js and webpack.client-watch.js specify port 8080. In addition, Hapi is running on port 8000. Do the server and client combine via a webpack configuration?
https://medium.com/front-end-developers/handcrafting-an-isomorphic-redux-application-with-love-40ada4468af4#.8c2ltij4x
It does work automatically with an npm start. My issues with updating state may have to do with me more, but b/c of the cocktail of issues I have to say I don't yet get it. For now, let's just focus on Webpack and Webpack alone.
EDIT — I've managed to repeat this inadvertently. My server-side is fetching, but my client side isn't getting the data pushed down to it.
There are two servers running, the Hapi server and the webpack-dev-server to serve the bundle file. If you wanna make calls to your server you only need make calls to the Hapi server as normally.
Where exactly are you having trouble?
@luandro - so I've been away for almost a month and I finally got it. I haven't really done the coding for this repo in particular, but now that I understand the difference between webpack-dev-server and webpack I'm definitley ready to go ahead and implement this. As a noob to React (who is more of a PM than a Dev)—I had a long uphill of stuff to learn (redux, hot-reloading, react-router, webpac and webpack-dev-server). Funnily enough, I want to start with the Readme so that those who go through this don't suffer the same kind of pain I did. :)