How to use the koa.call function in koa

To help you get started, we’ve selected a few koa examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github jbielick / kona / lib / kona.js View on Github external
function Kona(options) {

  // call the koa constructor here
  Koa.call(this);

  options = options || {};

  // setup kona root and application paths / helpers
  this.setupPaths(options);

  // setup env vars, logger, needed modules
  this.setupEnvironment(options);

  this.loadMixins(this.root.join('package.json'));
}
github larkjs / lark / lib / application.js View on Github external
function Application(options) {
    if (!(this instanceof Application)) {
        return new Application(options);
    }
    /**
     * Extend Koa
     **/
    koa.call(this);
    this.config = config(options);
    if (enable(this.config, 'logging')){
        logging.logging.configure(this.config.logging);
    }
    parsers(this, this.config.parsers);
}
github koajs / koa.io / lib / application.js View on Github external
function Application(options) {
  if (!(this instanceof Application)) return new Application(options);
  Koa.call(this);

  this.io = new Socket(options);
}

koa

Koa web app framework

MIT
Latest version published 7 months ago

Package Health Score

93 / 100
Full package analysis