Awesome
Horizon, React, Webpack boilerplate
Demo app is included.
What you get here:
- Horizon / RethinkDB app
- React Horizon
- React / Webpack complete workflow
- Tests configuration
How to start:
- You need Node 4.4 or higher
- Install RethinkDB here's how: http://rethinkdb.com/docs/install/
- Install Horizon from Npm:
npm install -g horizon
(we use Horizon 2 here) - Git clone this repo
- Go to the project folder:
cd horizon-react-webpack-boilerplate
- Install all Npm dependencies:
npm install
- Run Horizon server:
hz serve --dev
- In the second terminal tab run Webpack server:
npm start
What else you can do here:
- You can run ESLint tests:
npm run lint
- You can run tests:
npm run testonly
- You can run tests and linter:
npm test
- You can build your project for production,
dist
folder:npm run build
Testing
We use configuration with Mocha, Enzyme, JSDOM, Chai, Sinon etc. You can even test CSS Modules. Check out the example file in __tests__
folder.
Front-end stuff
- We use Stylus and sGrid
- We use PostCSS and Autoprefixer
- We use CSS Modules
- We use HMR
- There is React Router configuration here although we don't use it in this demo
This boilerplate needs improvements, but it is quite useful already. If you have any ideas let me know. I plan to build an app based on it so it will be probably improved over time.
There will be also a blog post about it soon. Stay tuned...
ps. I've included .hz/secrets.toml
here in the repo. In the real apps you don't want to do this ;) You need to keep your settings in secret.