b0VIM 7.4 / < ;  ¼ª©ŒŠ‰^9á઩—yM3.-÷õô˹‰\WUT+Þ§nXQMLÙ¿ Šƒ}|]-  ̲±Q÷À¿‚]YXcWED%$ } headers['content-type' } headers[' } headers['content-type'] = 'json' body = stringify(body) if (typeof body === 'object') { assert.ok(body, 'Merry.Ctx.send: body should exist') assert.equal(typeof headers, 'object', 'Merry.Ctx.send: headers should be type object') assert.equal(typeof statusCode, 'number', 'Merry.Ctx.send: statusCode should be type number') headers = headers || {}Ctx.prototype.send = function (statusCode, body, headers) {} this.res = res this.req = req this.log = log.child({ parent: 'merry:ctx' })function Ctx (req, res, log) {} } }) process.exit(1) console.error(err.stack) self.log.fatal(err) process.once('unhandledRejection', function (err) { if (process.listenerCount('unhandledRejection') === 0) { } }) process.exit(1) console.error(err.stack) self.log.fatal(err) process.once('uncaughtException', function (err) { if (process.listenerCount('uncaughtException') === 0) { var self = thisMerry.prototype._onerror = function () {} }) env: process.env.NODE_ENV || 'undefined' message: 'listening on port:' + this._port, this.log.info({Merry.prototype.onlisten = function () {} server.listen(this._port, this.onlisten.bind(this)) }) self.log[level](data) stats.on('data', function (level, data) { var stats = loghttp(server) var self = this var server = http.createServer(this.router.start()) assert.equal(typeof this._port, 'number', 'Merry.listen: port should be type number') this._port = port || this.env.PORTMerry.prototype.listen = function (port) {} return this.router.start() this._onerror() assert.ok(this.router, 'merry.start: router was not found. Did you run app.route() ?')Merry.prototype.start = function () {} } handler(req, res, ctx) ctx.params = params.params var ctx = new Ctx(req, res, self.log) function routeHandler (req, res, params) { self.router.route(method, route, routeHandler) var route = '/notFoundHandlerRoute' var method = 'GET' var self = thisMerry.prototype.defaultRoute = function (handler) {} } handler(req, res, ctx) ctx.params = params.params var ctx = new Ctx(req, res, self.log) function routeHandler (req, res, params) { self.router.route(method, route, routeHandler) var self = this assert.equal(typeof route, 'string', 'Merry.route: route should be type string') assert.equal(typeof method, 'string', 'Merry.route: method should be type string') assert.equal(typeof handler, 'function', 'Merry.route: handler should be type function') if (method === 'default') return this.defaultRoute(route) // if a default method is provided, second param is handlerMerry.prototype.route = function (method, route, handler) {} this._port = null this.env = envobj(opts.env || {}) this.router = serverRouter({ default: '/notFoundHandlerRoute' }) this.log = pino({ level: opts.logLevel || 'info', name: 'merry' }, opts.logStream || process.stdout) assert.equal(typeof opts, 'object', 'Merry: opts should be type object') opts = opts || {} if (!(this instanceof Merry)) return new Merry(opts)function Merry (opts) {module.exports = Merryvar pump = require('pump')var pino = require('pino')var http = require('http')var assert = require('assert')var envobj = require('envobj')var loghttp = require('log-http')var fromString = require('from2-string')var serverRouter = require('server-router')var stringify = require('fast-safe-stringify')ad"ZÖ¦¤£{\ZY} if (err) this.log.error(err)Ctx.prototype.ondone = function (err) {} pump(fromString(body), this.res, this.ondone) this.res.writeHead(statusCode, headers)