Koa Framework Suite
Last updated 4 years ago by shekhei .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install @shekhei/koala 
SYNC missed versions from official npm registry.


Gitter chat NPM version Build status Test coverage Dependency Status License Downloads Gittip

A suite of Koa utilities allowing for quicker bootstrapping, as well as a consequential guide on how to write apps using the Koa philosophy. Think of it as a KrakenJS for Koa.

Beware! Koala is alpha software!


Koa is a bare minimal framework, focusing on unopinionated core HTTP utilities. However, this is not sufficient for most apps as a lot is not supported out of the box. Including a bunch of dependencies in every new app you create quickly becomes annoying.

The goal of Koala is to include the most used and unopinionated parts of apps into a single framework. Many things such as body parsing, sessions, and CSRF are included. Many other things, such as routing, is too opinionated and not included.

Unlike other frameworks, Koala will not dictate how to write business logic. Thanks to generators and, eventually, ES7 Async/Await, writing business logic in Koa is much easier than other frameworks, and Koala's goal is to only make it easier. Don't expect a single option to automatically do magic for your app.

Feel free to create suggestions!

Features and Documentation

The Koala framework adds to Koa:

  • Body Parsing
    • Seamless Expect: 100-continue support
    • Per-request body limits
    • Supports JSON, urlencoded, and multipart bodies
    • Supports arbitrary strings, buffers, and files as bodies
    • Optional nested parameter support
  • SPDY - specifically push streams
  • File Serving - with SPDY push support
  • Sessions
    • Cookie-based sessions
    • CSRF protection
  • Polyfills - serve polyfill bundles based on the user agent
  • Response Caching - cache and serve responses using an arbitrary store
  • JSONP - safe jsonp support
  • Security Headers
  • Error Page - better default error page
  • Tracing
  • etc
    • Basic auth
    • Object stream support
    • Optional nested query string supported
  • FAQ

koala(1) will be a generator, similar to what express(1) is.


Simply replace require('koa') with require('koala'). Koala returns a koa app, except it includes more features.

var koala = require('koala');
var app = koala();

app.use(function* () {
  this.response.status = 204;

var fn = app.callback();

require('http').createServer(fn).listen(function (err) {
  if (err) throw err;
  console.log('Koala app listening on port %s', this.address().port);


Some additional features may include:

  • Timeout assertion
  • Server-Side Event Streams
  • Rate limiting

Let me know if you have any other suggestions.

Current Tags

  • 1.0.1                                ...           latest (4 years ago)

5 Versions

  • 1.0.1                                ...           4 years ago
  • 1.0.0                                ...           5 years ago
  • 0.10.1                                ...           5 years ago
  • 0.10.0                                ...           5 years ago
  • 0.9.4                                ...           5 years ago
Maintainers (1)
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 0
Dependencies (25)
Dev Dependencies (3)
Dependents (1)

Copyright 2014 - 2016 © taobao.org |