Skip to content
This repository has been archived by the owner on Jan 11, 2019. It is now read-only.

Commit

Permalink
Run server code directly on node with Babel's require hook. Replaced …
Browse files Browse the repository at this point in the history
…ContextHelper with React-Async!
  • Loading branch information
RickWong committed Mar 19, 2015
1 parent c83e304 commit 7315007
Show file tree
Hide file tree
Showing 10 changed files with 731 additions and 319 deletions.
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ Isomorphic starterkit with server-side React rendering using
[react.js](https://facebook.github.io/react),
[react-router](https://github.com/rackt/react-router),
[react-hot-loader](https://gaearon.github.io/react-hot-loader),
[react-async](https://github.com/andreypopp/react-async),
[react-a11y](https://github.com/rackt/react-a11y),
[react-inline-css](https://github.com/RickWong/react-inline-css)

Expand All @@ -24,7 +25,7 @@ Isomorphic starterkit with server-side React rendering using
- React.js + Router on the client and server
- React Hot Loader for instant client updates
- Babel.js automatically compiles ES6
- Context-helper to preload on server to client
- React-async to preload on server to client
- Style-component for quick in-component CSS
- Accessibility hints from react-a11y
- Shrinkwrapped npm dependencies
Expand Down
11 changes: 11 additions & 0 deletions babel.server.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
require("babel/register")({
experimental: true
});

/**
* Define isomorphic constants.
*/
global.__CLIENT__ = false;
global.__SERVER__ = true;

require("./src/server");
Loading

0 comments on commit 7315007

Please sign in to comment.