Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
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'));
}
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);
}
function Application(options) {
if (!(this instanceof Application)) return new Application(options);
Koa.call(this);
this.io = new Socket(options);
}