Skip to content
Full example using Koa, React, Passport, Mongoose, Webpack, Mocha, Babel
Branch: master
Clone or download
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
app
config
lib
src [added] eslint + bump most of deps Jul 9, 2015
test [added] eslint + bump most of deps Jul 9, 2015
webpack [bump] v0.6.1 webpack now proxied Jul 18, 2015
.babelrc [renamed] file to .js, removed use strict (es6) Jul 9, 2015
.eslintrc fixed: eslint woes Aug 25, 2015
.gitignore Now uses a layout Feb 8, 2015
.istanbul.yml
.npmignore
.travis.yml container based travis Apr 18, 2015
HISTORY.md [bump] v0.6.1 webpack now proxied Jul 18, 2015
LICENSE
README.md [tag] 0.6.0 Jul 9, 2015
package.json [deps] updated all deps except RB & Co Aug 28, 2015
register-babel.js
server.js
webpack.config.js

README.md

koa-react-full-example

Join the chat at https://gitter.im/dozoisch/koa-react-full-example

Pair on this

Build Status dependencies devdependencies Tasks

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

Installation

  1. Checkout in a directory
  2. npm install
  3. Try it and ensure tests pass with npm run build && npm test

Running the project

To run the project, you need two terminals.

  1. In the first terminal run npm run hot-dev-server
  2. In the second terminal run npm start
  3. Try access localhost:3000 You should normally get the login page.
  4. 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
You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.