Full example using Koa, React, Passport, Mongoose, Gulp, Mocha, and on Travis
This example contains a MVC pattern that presents a simple counter to the client that increments and decrements a value in the Mongo Database with Mongoose. The UI is all handled with ReactJS. It uses the yield keyword from ES6.
This projects uses bleeding-edge technology. It also uses unstable version of Mongoose (3.9) for the support of yield.
- Checkout in a directory
npm install
npm install -g gulp
(might need sudo)gulp install
- Try it and ensure tests passes with
npm test
- Build and start using
gulp dev
- Try access
localhost:3000
You should normally get the login page. - Create a user using the sign up page "#/signup". It should log you in automatically and you should be redirected to the counter
Build
gulp
or gulp install
Run Develop
npm start
or gulp dev
Run Tests
gulp && npm test
The plugin is under MIT license, please see the LICENSE file provided with the module.
Updates to come:
- Description of some design choices
- Error handling
- More in-depth React-Koa example