https://github.com/dozoisch/koa-react-full-example
Full example using Koa, React, Passport, Mongoose, Webpack, Mocha, Babel
https://github.com/dozoisch/koa-react-full-example
Last synced: over 1 year ago
JSON representation
Full example using Koa, React, Passport, Mongoose, Webpack, Mocha, Babel
- Host: GitHub
- URL: https://github.com/dozoisch/koa-react-full-example
- Owner: dozoisch
- License: mit
- Created: 2014-06-06T20:40:37.000Z (about 12 years ago)
- Default Branch: master
- Last Pushed: 2016-10-06T09:31:26.000Z (almost 10 years ago)
- Last Synced: 2025-03-28T12:07:06.636Z (over 1 year ago)
- Language: JavaScript
- Homepage:
- Size: 732 KB
- Stars: 621
- Watchers: 33
- Forks: 85
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- Changelog: HISTORY.md
- License: LICENSE
Awesome Lists containing this project
README
# koa-react-full-example
[](https://gitter.im/dozoisch/koa-react-full-example?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
[](http://start.thinkful.com/react/?utm_source=github&utm_medium=badge&utm_campaign=koa-react-full-example)
[![Build Status][travis.img]][travis.url]
[![dependencies][deps.img]][deps.url]
[![devdependencies][devdeps.img]][devdeps.url]
[![Tasks][waffle.img]][waffle.url]
Full example using Koa, React, Passport, Mongoose, Webpack, 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.
### Prerequisite
* [NodeJS](http://nodejs.org/download/) > 0.11.16 || 0.12
* [npm](https://www.npmjs.org/)
* [MongoDB](http://www.mongodb.org/downloads)
### Installation
0. Checkout in a directory
0. `npm install`
0. Try it and ensure tests pass with `npm run build && npm test`
### Running the project
To run the project, you need two terminals.
0. In the first terminal run `npm run hot-dev-server`
0. In the second terminal run `npm start`
0. Try access `localhost:3000` You should normally get the login page.
0. Create a user using the sign up page "#/signup". It should log you in automatically and you should be redirected to the counter
### Build commands
**Static Build**
`npm run build`
**Running Prod**
`npm run prod`
**Run Tests**
`npm run build && npm test`
### License
The plugin is under MIT license, please see the LICENSE file provided with the module.
### Soon
Updates to come when I get some time:
- Server side rendering with prod webpack config
- Redux
- Code coverage with iSparta istanbul.
- ES6/Babel server side
[travis.img]: https://api.travis-ci.org/dozoisch/koa-react-full-example.svg
[travis.url]: https://travis-ci.org/dozoisch/koa-react-full-example
[deps.img]: https://david-dm.org/dozoisch/koa-react-full-example.svg
[deps.url]: https://david-dm.org/dozoisch/koa-react-full-example
[devdeps.img]: https://david-dm.org/dozoisch/koa-react-full-example/dev-status.svg
[devdeps.url]: https://david-dm.org/dozoisch/koa-react-full-example#info=devDependencies
[waffle.img]: https://badge.waffle.io/dozoisch/koa-react-full-example.png?label=planned&title=Ready
[waffle.url]: https://waffle.io/dozoisch/koa-react-full-example