Skip to content

meddle0x53/react-webpack-koa-postgres-passport-example

Repository files navigation

koa-react-full-example

Full example using Koa, React, Passport, Postgres, Webpack and Mocha

This example contains a MVC pattern that presents a simple counter to the client that increments and decrements a value in the Postgres Database. The UI is all handled with ReactJS. It uses the yield keyword from ES6.

This projects uses bleeding-edge technology.

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.