Skip to content
A boilerplate using React + Redux + hapi + Router5, for building universal apps.
JavaScript
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
src
static
test
.babelrc
.eslintignore
.eslintrc
.gitignore
LICENSE
README.md
build.config.js
index.js
package.json
webpack.config-dev.js
webpack.config.js
webpack.server.js

README.md

universal-react-redux-hapi

A boilerplate using React + Redux + hapi + Router5, with Server-side rendering and hot-reloads.

Dependency Status devDependency Status

Features

  • Server-side rendering + hot reloads.
  • React
    • For the UI.
  • Radium + react-styling
    • For inline styles, which works perfectly with server-side rendering and React's virtual DOM.
  • React Helmet
    • For changing <title> tag, <meta> tags, etc in React.
  • Redux
    • For managing app's state.
  • Router5
    • For routing.
  • hapi + h2o2
    • For web server, web APIs, and proxying.
  • webpack
    • For building client bundles.
  • Babel6
    • For transpiling ES6(ES2015), and ES7(ES2016).
  • ESLint
    • For linting.
  • mocha, nock & power-assert
    • For testing.
    • power-assert supports async/await, which can be used with redux-promise

Personally, I think Router5 is better for managing the props than React Router. No React.cloneElement with this.props.children, no confusion with React's props, etc.

Getting started

First steps...

$ git clone https://github.com/nanopx/universal-react-redux-hapi.git MyApp
$ cd MyApp
$ npm install

Start development server

$ npm start

Start production server

$ NODE_ENV=production npm run build
$ NODE_ENV=production npm start

Linting

$ npm run lint

$ npm start in development mode, will also lint your codes every time it builds.

Testing

$ npm test

NOTE: Currently, changing the ./src/server.js will not reload the browser on change, but normally you wont need to change it.

I'm planning to fix this soon, but only if it doesn't make the boilerplate more complex.

License

MIT

You can’t perform that action at this time.