Skip to content
An opinionated boilerplate for koa v2 with batteries included
Branch: master
Clone or download
Pull request Compare This branch is 53 commits ahead, 2 commits behind umayr:master.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.vscode updatee stack and minor bug fixes Aug 26, 2017
bin added graphql May 29, 2017
src
.babelrc
.eslintignore
.eslintrc
.gitignore updatee stack and minor bug fixes Aug 26, 2017
LICENSE code cleanup Mar 10, 2018
Procfile updated dependencies May 24, 2017
README.md updated readme Mar 10, 2018
package.json code cleanup Mar 10, 2018
yarn.lock code cleanup Mar 10, 2018

README.md

kickoff-koa2

An opinionated boilerplate for koa v2 with batteries included.

Requirements

- Node >=v8.9.4
- NPM >=v4.1.2
- MongoDB

Features

- GraphQL API (Apollo Data)
- Local Authentication using Email and Password (Login, Register)
- Contact form request (powered by Mailgun, Sendgrid or Mandrill)
- File upload using Amazon S3

Setup

  # clone the repository
  λ git clone https://github.com/perminder-klair/kickoff-koa2
  # change the current directory
  λ cd kickoff-koa2
  # install all dependencies
  λ yarn install
  # run the project
  λ yarn start

Included

  • Koa Well, duh.
  • Koa Router For routing and all.
  • Koa Context Validator A robust context validator for koajs.
  • Nodemailer Send e-mails with Node.JS – easy as cake!
  • Mongoose MongoDB object modeling designed to work in an asynchronous environment.
  • Apollo data Tools & Products for GraphQL
  • Bunyan Extensive logging module.
  • AWS SDK AWS SDK for JavaScript in the browser and Node.js. strings.
  • Boom HTTP Errors.
  • Convict Configuration management.
  • Babel Support ES6/ES7 features.
  • ESLint Linting purposes (comes with extended Airbnb's base eslint configurations).
  • Nodemon Restart the server automatically (hot-reloading).

And many more small packages.

Scripts

  • yarn start - simply starts the server
  • yarn test - execute all unit tests
  • yarn run lint - lints all the files in src/ folder
  • yarn run lint:fix - fixes all the possible linting errors
  • yarn run watch - starts the server with hot-reloading

To use Node chrome debug, make sure to install this extension https://chrome.google.com/webstore/detail/nodejs-v8-inspector-manag/gnhhdgbaldcilmgcpfddgdbkhjohddkj/

You can’t perform that action at this time.