A data-driven, isomorphic example application using Fluxible and React.
A newer version of this idea exists at react-pwa-reference
Flux-React-Example is an example contact web application. Serves as a reference app to inspire isomorphic application development solutions.
- Features a data-driven isomorphic React application that follows the flux flow using Fluxible.
- Uses a Node, Express, Fluxible, React stack employing Grunt, Webpack, and Mocha/Chai.
- Employs Yahoo Fetchr for uniform client/server access to app services.
- Features a Flexbox layout with some very light usage of Foundation For Apps (The Sass mixins only, no JS, all possible CSS output disabled).
- Performance Features
- Majority of visual completeness in < 14k initial download.
- Fast rendering.
Additional documentation can be found in this project's wiki. This is still in progress.
Continued progress on this project toward a Progressive Application (includes a Manifest and Service Worker offline, push notifications, and background sync) exists at flux-react-example-sw.
This example demonstrates a full CI/CD integration on the master branch. Pushes to the master branch run the following workflow:
- Run unit tests w/coverage on Travis-ci.
- Build and deploy to the Heroku stage.
- Run cross-browser/platform functional tests on SauceLabs against the stage.
- Run performance budget tests on webpagetest.org against the stage.
- NodeJS ~4.2
- Globally installed grunt-cli
npm install -g grunt-cli
- Ruby >= 2.1.3p242 (Any version that runs Compass is fine)
- Globally installed Compass >= 1.0.1
gem install compass
- Clone this repo
- Install the dependencies
$ npm install
$ npm run build
$ npm start
*Assumes you don't have NODE_ENV set in your environment. If you do have it set, it must be set to "production" to run the production build of the app this way. If you use NODE_ENV in your environment for something else and still want to just run the production app, use this method.
$ npm run dev
This will use nodemon
and webpack
to watch for changes and restart and
rebuild as needed.
$ npm run prod
This will use nodemon
and webpack
to watch for changes and restart and
rebuild as needed.
- Start node-inspector on the port of your choice in the background
$ node-inspector --web-port=<port-of-choice> &
- Run the debug build (a very slightly modified dev build)
$ npm run debug
- Use Chrome to open
http://127.0.0.1:8090/?ws=127.0.0.1:<port-of-choice>&port=5858
- Set breakpoints and/or hit F8 to start the server-side of the app.
This will use nodemon
and webpack
to watch for changes and restart and
rebuild as needed. The nodemon process will start with --debug-brk
option to let you break on anything from the ground up.
Unless otherwise specified, this software is free to use under the LocalNerve BSD license. See the LICENSE file for license text and copyright information.