You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* master: (31 commits)
upgraded redux-form to v1.4.0
upgraded redux-form to 1.3.4
rolled back last commit which prematurely tried to upgrade to "history" lib
added history library
upgraded to v2.0.0 of redux, react-redux and redux-devtools
updated redux-form to v1.2.1
upgraded to redux-form 1.0.1
upgraded to redux-form 1.0.0
Fix styles not found in production bug
moved Ducks doc to its own repo for findability. fixes#146
fixed readme error to fix#151
update react-hot-loader
upgraded to redux-form v0.6.1
fixed bug in previous commit. oops.
undid PR #93 to fix#142. thanks, @halt-hammerzeit!
added the error handling to avoid http-party/node-http-proxy#527
updated paypal button
updated paypal button
added paypal button
updated redux-form to 0.5.0
...
This is a starter boiler plate app I've put together using the following technologies:
10
11
@@ -49,11 +50,15 @@ npm run start
49
50
50
51
## Demo
51
52
52
-
A demonstration of this app can be see[running on heroku](https://react-redux.herokuapp.com), which is a deployment of the [heroku branch](https://github.com/erikras/react-redux-universal-hot-example/tree/heroku).
53
+
A demonstration of this app can be seen[running on heroku](https://react-redux.herokuapp.com), which is a deployment of the [heroku branch](https://github.com/erikras/react-redux-universal-hot-example/tree/heroku).
53
54
54
55
## Explanation
55
56
56
-
What initally gets run is `babel.server.js`, which does little more than enable ES6 and ES7 awesomeness in the server-side node code. It then initiates `server.js`. In `server.js` we proxy any requests to `/api/*` to the [API server](#api-server), running at `localhost:3030`. All the data fetching calls from the client go to `/api/*`. Aside from serving the favicon and static content from `/static`, the only thing `server.js` does is initiate delegate rendering to `react-router`. At the bottom of `server.js`, we listen to port `3000` and initiate the API server.
57
+
What initally gets run is `bin/server.js`, which does little more than enable ES6 and ES7 awesomeness in the
58
+
server-side node code. It then initiates `server.js`. In `server.js` we proxy any requests to `/api/*` to the
59
+
[API server](#api-server), running at `localhost:3030`. All the data fetching calls from the client go to `/api/*`.
60
+
Aside from serving the favicon and static content from `/static`, the only thing `server.js` does is initiate delegate
61
+
rendering to `react-router`. At the bottom of `server.js`, we listen to port `3000` and initiate the API server.
57
62
58
63
#### Routing and HTML return
59
64
@@ -80,6 +85,12 @@ The middleware, [`clientMiddleware.js`](https://github.com/erikras/react-redux-u
80
85
1. To allow the action creators access to the client API facade. Remember this is the same on both the client and the server, and cannot simply be `import`ed because it holds the cookie needed to maintain session on server-to-server requests.
81
86
2. To allow some actions to pass a "promise generator", a function that takes the API client and returns a promise. Such actions require three action types, the `REQUEST` action that initiates the data loading, and a `SUCCESS` and `FAILURE` action that will be fired depending on the result of the promise. There are other ways to accomplish this, some discussed [here](https://github.com/gaearon/redux/issues/99), which you may prefer, but to the author of this example, the middleware way feels cleanest.
82
87
88
+
#### What the Duck?
89
+
90
+
[Ducks](https://github.com/erikras/ducks-modular-redux) are a Redux Style Proposal that I came up with to better
91
+
isolate concerns within a Redux application. I encourage you to read the
92
+
[Ducks Docs](https://github.com/erikras/ducks-modular-redux) and provide feedback.
93
+
83
94
#### API Server
84
95
85
96
This is where the meat of your server-side application goes. It doesn't have to be implemented in Node or Express at all. This is where you connect to your database and provide authentication and session management. In this example, it's just spitting out some json with the current time stamp.
0 commit comments