Example project setup with configuration out the box and a working dev api server.
- Webpack - module loader. Configured using the hjs-webpack helpers/presets.
- webpack-dev-server including hot module replacement (supports react and css) - local server to run client application.
- React - user interface development library.
- RxJS - reactive extensions for JS.
- ImmutableJS - immutable collections for JavaScript.
- hapi-dummy-api - generate dummy APIs for hapi.js, for building clientside apps before the real API is done.
- ES2015 - syntax support.
- yeticss - lightweight, modular pattern library written in Stylus (simple style bootstrap so don't have to bother).
- Build -
npm run build
- Start local server -
npm start
- Start dummy api -
node api/server.js
To add further api endpoints simply:
- Create a new file in
api/plugins/
and follow the logic as seen inapi/plugins/people
. - Register the plugin in the
api/server.js
by simply adding to the array of registered plugins e.g.
[{
register: dummy,
options: require('./plugins/people')
},{
register: dummy,
options: require('./plugins/another')
}]