b0VIM 7.4Z-Y+x^lrlnaIrinas-MBP.fritz.box~lrlna/developer/merry/index.js 3210#"! Utp|ad||]>#q]\ u a _ ^ " 3 d c 6 w Q  h  _^(oB=;:sT>732piecbC7hC?>} if (err) this.log.error(err)Ctx.prototype.ondone = function (err) {} pump(fromString(body), this.res, this.ondone) this.res.writeHead(statusCode, 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' port: this._port, message: 'listening', this.log.info({Merry.prototype.onlisten = function () {} server.listen(this._port, this.onlisten.bind(this)) this._port = port var server = http.createServer(this.router.start()) assert.equal(typeof port, 'number', 'Merry.listen: port should be type number')Merry.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 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 var ctx = new Ctx(req, res, self.log) function routeHandler (req, res, params) { self.router.route(method, route, routeHandler) // ease things for V8 by setting handler as prototype 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(handler)Merry.prototype.route = function (method, route, handler) {} this._port = null this.router = serverRouter({ default: '/notFoundHandlerRoute' }) this.log = pino({ level: opts.logLevel || 'info' }, 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 = MerryMerry.env = envobjvar pump = require('pump')var pino = require('pino')var http = require('http')var assert = require('assert')var envobj = require('envobj')var fromString = require('from2-string')var serverRouter = require('server-router')var stringify = require('fast-safe-stringify')