Really easy react universal boilerplate with many commentaries
- React
- Redux
- Server Side Rendering
- React Router
- Immutable-js (with_immutable branch. see below for details)
- Api server on other port (express)
- Sass
- React-helmet
- Mocha
- Chai
- Enzyme
- Sinon
- Others:
- ducks-modular-redux
- api + promise middleware
- bundle.css for server-side-rendering
- vendor bundle
- async pages
- webpack resolving alias
- 4 modes for run (with auto rimraf dist)
- api server
- gzip css, js, fonts
Doesn't have redux-form and bootstrap (you can add if needed)
See commentaries in code
Install rimraf: $ npm install rimraf -g
Install nodemon: $ npm install nodemon -g
Install concurrently: $ npm install -g concurrently
$ npm run api
$ npm run start
after: open 'http://localhost:3000' in browser
hint: use this mode for development
$ npm run api
$ npm run start-ssr
after: open 'http://localhost:3000' in browser
hint: use this mode for test server-side-rendering before build.
doesn't have hot reload, but you can mannualy refresh page in browser.
$ npm run build
$ npm run api:prod
$ npm run start:prod
after: open 'http://localhost' in browser
hint: use this mode for production on server (without server-side-rendering)
$ npm run build
$ npm run api:prod
$ npm run start-ssr:prod
after: open 'http://localhost' in browser
hint: use this mode for production on server
$ npm run test
How to add immutable-js?
See branch: with_immutable