{"_id":"journeyman","_rev":"29-37c6c952d071b97f0a9087d3c0e01c2f","name":"journeyman","description":"thin wrapper for middleware with node's http server","dist-tags":{"latest":"0.0.9"},"versions":{"0.0.1":{"name":"journeyman","version":"0.0.1","description":"thin wrapper for middleware with node's http server","main":"index.js","scripts":{"test":"mocha"},"repository":{"type":"git","url":"git://github.com/bthesorceror/journeyman.git"},"devDependencies":{"mocha":"~1.8.1","mockery":"~1.4.0","sinon":"~1.5.2","zombie":"~1.4.1"},"author":{"name":"Brandon Farmer"},"license":"BSD","dependencies":{},"readme":"Journeyman\n=======\n\n[![Build Status](https://travis-ci.org/bthesorceror/journeyman.png?branch=master)](https://travis-ci.org/bthesorceror/journeyman)\n\nthin wrapper for middleware with node's http server\n\nExample\n==============================\n\n```ruby\nvar Journeyman = require('../index.js');\n\nvar port = 3000,\n    server = new Journeyman(port);\n\nserver.use(function(req, res) {\n  res.writeHead(200);\n  res.end(res.params);\n});\n\nserver.use(function(req, res, next) { next(); });\n\nserver.use(function(req, res, next) {\n  res.params = 'WHERE AM I??';\n  next();\n});\n\nserver.listen();\n```\n\ngoing to http://localhost:3000 will render out a success with the contents \"WHERE AM I??\"\n","_id":"journeyman@0.0.1","dist":{"shasum":"779ceee934ab16a39bc3a6ae93b815470157ee47","tarball":"https://registry.npmjs.org/journeyman/-/journeyman-0.0.1.tgz","integrity":"sha512-pS3zqBAj/WSrBS4isrGjP3o0HAsdqag1bPsyWQYW9ox/zZtCgp3D5cGSr2wPjmMSt8eltiiKotBQyoFdTyJhyA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDCqsg4bi6v9TvohMb0hYfrb13tz4vQ/p8ahh0LZQCNeAIhALlfKBxL7K6k59JuHpy6iPrmf3IvfLnpFIXUpaEXASJy"}]},"_npmVersion":"1.1.49","_npmUser":{"name":"bthesorceror","email":"bthesorceror@gmail.com"},"maintainers":[{"name":"bthesorceror","email":"bthesorceror@gmail.com"}],"directories":{}},"0.0.2":{"name":"journeyman","version":"0.0.2","description":"thin wrapper for middleware with node's http server","main":"index.js","scripts":{"test":"mocha"},"repository":{"type":"git","url":"git://github.com/bthesorceror/journeyman.git"},"devDependencies":{"mocha":"~1.8.1","mockery":"~1.4.0","sinon":"~1.5.2","zombie":"~1.4.1"},"author":{"name":"Brandon Farmer"},"license":"BSD","dependencies":{},"readme":"Journeyman\n==========\n\n[![Build Status](https://travis-ci.org/bthesorceror/journeyman.png?branch=master)](https://travis-ci.org/bthesorceror/journeyman)\n\nthin wrapper for middleware with node's http server\n\nExample\n=======\n\n```javascript\nvar Journeyman = require('journeyman');\n\nvar port = 3000,\n    server = new Journeyman(port);\n\nserver.use(function(req, res) {\n  res.writeHead(200);\n  res.end(res.params);\n});\n\nserver.use(function(req, res, next) { next(); });\n\nserver.use(function(req, res, next) {\n  res.params = 'WHERE AM I??';\n  next();\n});\n\nserver.listen();\n```\n\ngoing to http://localhost:3000 will render out a success with the contents \"WHERE AM I??\"\n\nNow with time profiling\n=======================\n\nJourney will emit events at the start and end of every request-response cycle\n\n\"start\"\n\n```javascript\n\nserver.on('start', function(req, res) {\n  console.log('********************************');\n  console.log('Response started');\n  console.log('********************************');\n});\n\n\n```\n\n\"end\"\n\n```javascript\n\nserver.on('end', function(req, res, time) {\n  console.log('********************************');\n  console.log('Response completed in ' + time + ' seconds');\n  console.log('********************************');\n});\n\n```\n","readmeFilename":"README.md","_id":"journeyman@0.0.2","dist":{"shasum":"c69d7799b4b8554fecfe93d2107529f8445abb23","tarball":"https://registry.npmjs.org/journeyman/-/journeyman-0.0.2.tgz","integrity":"sha512-ActIEWtGpDpd1N8KbHplhVK6iR/wI2dSqbTTqsWt2u+5eJ3oqdQw6L4LbsAtOeP2xbjdTCTqNJoU9sWAAUc9iw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIEh0DjwqtNHsdkN3AUeiIxUDUtqixl7u1AL1/anaeT82AiAGfSywc9m3ewmN02TzwYwSy8UYa12rBgS4CaSOyXXetw=="}]},"_from":".","_npmVersion":"1.2.15","_npmUser":{"name":"bthesorceror","email":"bthesorceror@gmail.com"},"maintainers":[{"name":"bthesorceror","email":"bthesorceror@gmail.com"}],"directories":{}},"0.0.3":{"name":"journeyman","version":"0.0.3","description":"thin wrapper for middleware with node's http server","main":"index.js","scripts":{"test":"mocha"},"repository":{"type":"git","url":"git://github.com/bthesorceror/journeyman.git"},"devDependencies":{"mocha":"~1.8.1","mockery":"~1.4.0","sinon":"~1.5.2","zombie":"~1.4.1"},"author":{"name":"Brandon Farmer"},"license":"BSD","dependencies":{},"readme":"Journeyman\n==========\n\n[![Build Status](https://travis-ci.org/bthesorceror/journeyman.png?branch=master)](https://travis-ci.org/bthesorceror/journeyman)\n\nthin wrapper for middleware with node's http server\n\nExample\n=======\n\n```javascript\nvar Journeyman = require('journeyman');\n\nvar port = 3000,\n    server = new Journeyman(port);\n\nserver.use(function(req, res) {\n  res.writeHead(200);\n  res.end(res.params);\n});\n\nserver.use(function(req, res, next) { next(); });\n\nserver.use(function(req, res, next) {\n  res.params = 'WHERE AM I??';\n  next();\n});\n\nserver.listen();\n```\n\ngoing to http://localhost:3000 will render out a success with the contents \"WHERE AM I??\"\n\nNow with time profiling\n=======================\n\nJourneyman will emit events at the start and end of every request-response cycle\n\nEvents\n------\n\n\"start\"\n\n```javascript\n\nserver.on('start', function(req, res) {\n  console.log('********************************');\n  console.log('Response started');\n  console.log('********************************');\n});\n\n\n```\n\n\"end\"\n\n```javascript\n\nserver.on('end', function(req, res, time) {\n  console.log('********************************');\n  console.log('Response completed in ' + time + ' seconds');\n  console.log('********************************');\n});\n\n```\n\nMiddleware time profiling\n=========================\n\nJourneyman will also emit events at the beginning and end of each middleware\n\n```javascript\nserver.use(function(req, res, next) {\n  res.params = 'WHERE AM I??';\n  next();\n}, 'middleware name');\n```\n\nMiddleware name will default to 'default' if it is not set.\n\nEvents\n------\n\n\"startMiddleware\"\n\n```javascript\nserver.on('startMiddleware', function(req, res, name) {\n  console.log('********************************');\n  console.log('Middleware: ' + name + ' has started');\n  console.log('********************************');\n});\n```\n\n\"endMiddleware\"\n\n```javascript\nserver.on('endMiddleware', function(req, res, name, time) {\n  console.log('********************************');\n  console.log('Middleware: ' + name + ' completed in ' + time + ' seconds');\n  console.log('********************************');\n});\n```\n","readmeFilename":"README.md","_id":"journeyman@0.0.3","dist":{"shasum":"12d673a8c0cc6cf6dc2db7b5d5c2870f91a6bab8","tarball":"https://registry.npmjs.org/journeyman/-/journeyman-0.0.3.tgz","integrity":"sha512-jexWNnse35IVoXHjyXhOrkil7MydcSTEgtmEdtpqcxloN2LNojijtrKRY4QgzTWYyBM7X6JftXQ0e9TpAS/idw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIH45sYD7RuNM6A8Z9Gyg598MjW1Bu7RxRRl67GgwSPauAiEA9y6KcOichCmPJjiK137pQopQjDcZ+RstkC64cZPstTA="}]},"_from":".","_npmVersion":"1.2.15","_npmUser":{"name":"bthesorceror","email":"bthesorceror@gmail.com"},"maintainers":[{"name":"bthesorceror","email":"bthesorceror@gmail.com"}],"directories":{}},"0.0.4":{"name":"journeyman","version":"0.0.4","description":"thin wrapper for middleware with node's http server","main":"index.js","scripts":{"test":"mocha"},"repository":{"type":"git","url":"git://github.com/bthesorceror/journeyman.git"},"devDependencies":{"mocha":"~1.8.1","mockery":"~1.4.0","sinon":"~1.5.2","zombie":"~2.0.0-alpha19"},"author":{"name":"Brandon Farmer"},"license":"BSD","dependencies":{},"readme":"Journeyman\n==========\n\n[![Build Status](https://travis-ci.org/bthesorceror/journeyman.png?branch=master)](https://travis-ci.org/bthesorceror/journeyman)\n\nthin wrapper for middleware with node's http server\n\nExample\n=======\n\n```javascript\nvar Journeyman = require('journeyman');\n\nvar port = 3000,\n    server = new Journeyman(port);\n\nserver.use(function(req, res) {\n  res.writeHead(200);\n  res.end(res.params);\n});\n\nserver.use(function(req, res, next) { next(); });\n\nserver.use(function(req, res, next) {\n  res.params = 'WHERE AM I??';\n  next();\n});\n\nserver.listen();\n```\n\ngoing to http://localhost:3000 will render out a success with the contents \"WHERE AM I??\"\n\nNow with time profiling\n=======================\n\nJourneyman will emit events at the start and end of every request-response cycle\n\nEvents\n------\n\n\"start\"\n\n```javascript\n\nserver.on('start', function(req, res) {\n  console.log('********************************');\n  console.log('Response started');\n  console.log('********************************');\n});\n\n\n```\n\n\"end\"\n\n```javascript\n\nserver.on('end', function(req, res, time) {\n  console.log('********************************');\n  console.log('Response completed in ' + time + ' seconds');\n  console.log('********************************');\n});\n\n```\n\nMiddleware time profiling\n=========================\n\nJourneyman will also emit events at the beginning and end of each middleware\n\n```javascript\nserver.use(function(req, res, next) {\n  res.params = 'WHERE AM I??';\n  next();\n}, 'middleware name');\n```\n\nMiddleware name will default to 'default' if it is not set.\n\nEvents\n------\n\n\"startMiddleware\"\n\n```javascript\nserver.on('startMiddleware', function(req, res, name) {\n  console.log('********************************');\n  console.log('Middleware: ' + name + ' has started');\n  console.log('********************************');\n});\n```\n\n\"endMiddleware\"\n\n```javascript\nserver.on('endMiddleware', function(req, res, name, time) {\n  console.log('********************************');\n  console.log('Middleware: ' + name + ' completed in ' + time + ' seconds');\n  console.log('********************************');\n});\n```\n","readmeFilename":"README.md","bugs":{"url":"https://github.com/bthesorceror/journeyman/issues"},"_id":"journeyman@0.0.4","dist":{"shasum":"8cc35021d24557811b411507ac6ee6bd56cc0f41","tarball":"https://registry.npmjs.org/journeyman/-/journeyman-0.0.4.tgz","integrity":"sha512-CzAGVL7TdycJ2AVNG2KazVvAgdLrVxJcfWQqnio/yKbyKm0CReurXwzBiSHfLw28Vi8kdXM83R1X01UaMRuF2Q==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIGl7TEuvTRmw/rhoUYETRFQab9qK4nbfXfUUV+7BMyvkAiBEfWHE+L5CTE/wU/uf44/403oVa8ySQIxkEXLvFeAV0A=="}]},"_from":".","_npmVersion":"1.2.30","_npmUser":{"name":"bthesorceror","email":"bthesorceror@gmail.com"},"maintainers":[{"name":"bthesorceror","email":"bthesorceror@gmail.com"}]},"0.0.5":{"name":"journeyman","version":"0.0.5","description":"thin wrapper for middleware with node's http server","main":"index.js","scripts":{"test":"mocha"},"repository":{"type":"git","url":"git://github.com/bthesorceror/journeyman.git"},"devDependencies":{"mocha":"~1.8.1","sinon":"~1.5.2","zombie":"~2.0.0-alpha19"},"author":{"name":"Brandon Farmer"},"license":"BSD","dependencies":{},"readme":"Journeyman\n==========\n\n[![Build Status](https://travis-ci.org/bthesorceror/journeyman.png?branch=master)](https://travis-ci.org/bthesorceror/journeyman)\n\nthin wrapper for middleware with node's http server\n\nExample\n=======\n\n```javascript\nvar Journeyman = require('journeyman');\n\nvar port = 3000,\n    server = new Journeyman(port);\n\nserver.use(function(req, res) {\n  res.writeHead(200);\n  res.end(res.params);\n});\n\nserver.use(function(req, res, next) { next(); });\n\nserver.use(function(req, res, next) {\n  res.params = 'WHERE AM I??';\n  next();\n});\n\nserver.listen();\n```\n\ngoing to http://localhost:3000 will render out a success with the contents \"WHERE AM I??\"\n\nSSL support\n===========\n\nPass the path to both the ssl key and certificate\n\n```javascript\n\nvar journeyman = new Journeyman(3001, { key: 'path/to/key', cert: 'path/to/certificate' });\n\n```\n\nNow with time profiling\n=======================\n\nJourneyman will emit events at the start and end of every request-response cycle\n\nEvents\n------\n\n\"start\"\n\n```javascript\n\nserver.on('start', function(req, res) {\n  console.log('********************************');\n  console.log('Response started');\n  console.log('********************************');\n});\n\n\n```\n\n\"end\"\n\n```javascript\n\nserver.on('end', function(req, res, time) {\n  console.log('********************************');\n  console.log('Response completed in ' + time + ' seconds');\n  console.log('********************************');\n});\n\n```\n\nMiddleware time profiling\n=========================\n\nJourneyman will also emit events at the beginning and end of each middleware\n\n```javascript\nserver.use(function(req, res, next) {\n  res.params = 'WHERE AM I??';\n  next();\n}, 'middleware name');\n```\n\nMiddleware name will default to 'default' if it is not set.\n\nEvents\n------\n\n\"startMiddleware\"\n\n```javascript\nserver.on('startMiddleware', function(req, res, name) {\n  console.log('********************************');\n  console.log('Middleware: ' + name + ' has started');\n  console.log('********************************');\n});\n```\n\n\"endMiddleware\"\n\n```javascript\nserver.on('endMiddleware', function(req, res, name, time) {\n  console.log('********************************');\n  console.log('Middleware: ' + name + ' completed in ' + time + ' seconds');\n  console.log('********************************');\n});\n```\n","readmeFilename":"README.md","bugs":{"url":"https://github.com/bthesorceror/journeyman/issues"},"_id":"journeyman@0.0.5","dist":{"shasum":"c0523ffe7d0cec25f1c80a0588ceb31a12c93612","tarball":"https://registry.npmjs.org/journeyman/-/journeyman-0.0.5.tgz","integrity":"sha512-aXuLEt3Rkftu6h1RxwlN7q8XzXHmAp8U/7Gg8zwUI06Vm3WLR47yPNt3WDEDIiBwxYESxbI3InqqI9O+ADTmPQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIAdbw3WetMZrwn6Q0KeSuiYg9Ms3FEAiVt43Yg/zNzbwAiA4cpbMMGpdPclePt5ICeP8s8R4yiBSCqLhIrlyxdYZOw=="}]},"_from":".","_npmVersion":"1.2.30","_npmUser":{"name":"bthesorceror","email":"bthesorceror@gmail.com"},"maintainers":[{"name":"bthesorceror","email":"bthesorceror@gmail.com"}]},"0.0.6":{"name":"journeyman","version":"0.0.6","description":"thin wrapper for middleware with node's http server","main":"index.js","scripts":{"test":"mocha"},"repository":{"type":"git","url":"git://github.com/bthesorceror/journeyman.git"},"devDependencies":{"mocha":"~1.8.1","sinon":"~1.5.2","zombie":"~2.0.0-alpha19"},"author":{"name":"Brandon Farmer"},"license":"BSD","dependencies":{},"readme":"Journeyman\n==========\n\n[![Build Status](https://travis-ci.org/bthesorceror/journeyman.png?branch=master)](https://travis-ci.org/bthesorceror/journeyman)\n\nthin wrapper for middleware with node's http server\n\nExample\n=======\n\n```javascript\nvar Journeyman = require('journeyman');\n\nvar port = 3000,\n    server = new Journeyman(port);\n\nserver.use(function(req, res) {\n  res.writeHead(200);\n  res.end(res.params);\n});\n\nserver.use(function(req, res, next) { next(); });\n\nserver.use(function(req, res, next) {\n  res.params = 'WHERE AM I??';\n  next();\n});\n\nserver.listen();\n```\n\ngoing to http://localhost:3000 will render out a success with the contents \"WHERE AM I??\"\n\nSSL support\n===========\n\nPass the path to both the ssl key and certificate\n\n```javascript\n\nvar journeyman = new Journeyman(3001, { key: 'path/to/key', cert: 'path/to/certificate' });\n\n```\n\nNow with time profiling\n=======================\n\nJourneyman will emit events at the start and end of every request-response cycle\n\nEvents\n------\n\n\"start\"\n\n```javascript\n\nserver.on('start', function(req, res) {\n  console.log('********************************');\n  console.log('Response started');\n  console.log('********************************');\n});\n\n\n```\n\n\"end\"\n\n```javascript\n\nserver.on('end', function(req, res, time) {\n  console.log('********************************');\n  console.log('Response completed in ' + time + ' seconds');\n  console.log('********************************');\n});\n\n```\n\nMiddleware time profiling\n=========================\n\nJourneyman will also emit events at the beginning and end of each middleware\n\n```javascript\nserver.use(function(req, res, next) {\n  res.params = 'WHERE AM I??';\n  next();\n}, 'middleware name');\n```\n\nMiddleware name will default to 'default' if it is not set.\n\nEvents\n------\n\n\"startMiddleware\"\n\n```javascript\nserver.on('startMiddleware', function(req, res, name) {\n  console.log('********************************');\n  console.log('Middleware: ' + name + ' has started');\n  console.log('********************************');\n});\n```\n\n\"endMiddleware\"\n\n```javascript\nserver.on('endMiddleware', function(req, res, name, time) {\n  console.log('********************************');\n  console.log('Middleware: ' + name + ' completed in ' + time + ' seconds');\n  console.log('********************************');\n});\n```\n","readmeFilename":"README.md","bugs":{"url":"https://github.com/bthesorceror/journeyman/issues"},"_id":"journeyman@0.0.6","dist":{"shasum":"306a499b6dc89fe346008fdc3cfe8e8703f761f5","tarball":"https://registry.npmjs.org/journeyman/-/journeyman-0.0.6.tgz","integrity":"sha512-aAvayuy6dvUilhkwICQto3vsxJ5YAyAsRyYdybaxA0gYqhlt6LZIvU+Yb4LxmFjnBqHXUuY83UCihhbVuv6vFg==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDGW+fPD/EXVw4hjR51rO0Am8A97QEDJQ4SY9mu5p/1bQIgYmbFVA0rH01vAwnBaB2Kmr0KSQANlTEOMZS7NAvZzIU="}]},"_from":".","_npmVersion":"1.2.32","_npmUser":{"name":"bthesorceror","email":"bthesorceror@gmail.com"},"maintainers":[{"name":"bthesorceror","email":"bthesorceror@gmail.com"}]},"0.0.7":{"name":"journeyman","version":"0.0.7","description":"thin wrapper for middleware with node's http server","main":"index.js","scripts":{"test":"mocha"},"repository":{"type":"git","url":"git://github.com/bthesorceror/journeyman.git"},"devDependencies":{"mocha":"~1.8.1","sinon":"~1.5.2","zombie":"~2.0.0-alpha19"},"author":{"name":"Brandon Farmer"},"license":"BSD","dependencies":{},"readme":"Journeyman\n==========\n\n[![Build Status](https://travis-ci.org/bthesorceror/journeyman.png?branch=master)](https://travis-ci.org/bthesorceror/journeyman)\n\nthin wrapper for middleware with node's http server\n\nExample\n=======\n\n```javascript\nvar Journeyman = require('journeyman');\n\nvar port = 3000,\n    server = new Journeyman(port);\n\nserver.use(function(req, res) {\n  res.writeHead(200);\n  res.end(res.params);\n});\n\nserver.use(function(req, res, next) { next(); });\n\nserver.use(function(req, res, next) {\n  res.params = 'WHERE AM I??';\n  next();\n});\n\nserver.listen();\n```\n\ngoing to http://localhost:3000 will render out a success with the contents \"WHERE AM I??\"\n\nSSL support\n===========\n\nPass the path to both the ssl key and certificate\n\n```javascript\n\nvar journeyman = new Journeyman(3001, { key: 'path/to/key', cert: 'path/to/certificate' });\n\n```\n\nNow with time profiling\n=======================\n\nJourneyman will emit events at the start and end of every request-response cycle\n\nEvents\n------\n\n\"start\"\n\n```javascript\n\nserver.on('start', function(req, res) {\n  console.log('********************************');\n  console.log('Response started');\n  console.log('********************************');\n});\n\n\n```\n\n\"end\"\n\n```javascript\n\nserver.on('end', function(req, res, time) {\n  console.log('********************************');\n  console.log('Response completed in ' + time + ' seconds');\n  console.log('********************************');\n});\n\n```\n\nMiddleware time profiling\n=========================\n\nJourneyman will also emit events at the beginning and end of each middleware\n\n```javascript\nserver.use(function(req, res, next) {\n  res.params = 'WHERE AM I??';\n  next();\n}, 'middleware name');\n```\n\nMiddleware name will default to 'default' if it is not set.\n\nEvents\n------\n\n\"startMiddleware\"\n\n```javascript\nserver.on('startMiddleware', function(req, res, name) {\n  console.log('********************************');\n  console.log('Middleware: ' + name + ' has started');\n  console.log('********************************');\n});\n```\n\n\"endMiddleware\"\n\n```javascript\nserver.on('endMiddleware', function(req, res, name, time) {\n  console.log('********************************');\n  console.log('Middleware: ' + name + ' completed in ' + time + ' seconds');\n  console.log('********************************');\n});\n```\n","readmeFilename":"README.md","bugs":{"url":"https://github.com/bthesorceror/journeyman/issues"},"_id":"journeyman@0.0.7","dist":{"shasum":"ebeef39e2ce5106928e062e7cbb3760440e2d77d","tarball":"https://registry.npmjs.org/journeyman/-/journeyman-0.0.7.tgz","integrity":"sha512-kYxWPSmEZhcAD2XRyRcOfJNZYkls/OsOJcpPxiHLcr7izoCSY/MP0ckhr7U5/yAZ9bphoKXsyorzHhBAyFA5XQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQC5i1bE1USqgHde5oMv+kpKhauUpdPwu82Tz9USAjjTDgIhAPdDqoZEyFEnS9o7ASHhrXu457TCDbx+uqMX0jCQUbD7"}]},"_from":".","_npmVersion":"1.2.32","_npmUser":{"name":"bthesorceror","email":"bthesorceror@gmail.com"},"maintainers":[{"name":"bthesorceror","email":"bthesorceror@gmail.com"}]},"0.0.8":{"name":"journeyman","version":"0.0.8","description":"thin wrapper for middleware with node's http server","main":"index.js","scripts":{"test":"mocha"},"repository":{"type":"git","url":"git://github.com/bthesorceror/journeyman.git"},"devDependencies":{"mocha":"~1.8.1","sinon":"~1.5.2","zombie":"~2.0.0-alpha19"},"author":{"name":"Brandon Farmer"},"license":"BSD","dependencies":{},"readme":"Journeyman\n==========\n\n[![Build Status](https://travis-ci.org/bthesorceror/journeyman.png?branch=master)](https://travis-ci.org/bthesorceror/journeyman)\n\nthin wrapper for middleware with node's http server\n\nExample\n=======\n\n```javascript\nvar Journeyman = require('journeyman');\n\nvar port = 3000,\n    server = new Journeyman(port);\n\nserver.use(function(req, res) {\n  res.writeHead(200);\n  res.end(res.params);\n});\n\nserver.use(function(req, res, next) { next(); });\n\nserver.use(function(req, res, next) {\n  res.params = 'WHERE AM I??';\n  next();\n});\n\nserver.listen();\n```\n\ngoing to http://localhost:3000 will render out a success with the contents \"WHERE AM I??\"\n\nSSL support\n===========\n\nPass the path to both the ssl key and certificate\n\n```javascript\n\nvar journeyman = new Journeyman(3001, { key: 'path/to/key', cert: 'path/to/certificate' });\n\n```\n\nNow with time profiling\n=======================\n\nJourneyman will emit events at the start and end of every request-response cycle\n\nEvents\n------\n\n\"start\"\n\n```javascript\n\nserver.on('start', function(req, res) {\n  console.log('********************************');\n  console.log('Response started');\n  console.log('********************************');\n});\n\n\n```\n\n\"end\"\n\n```javascript\n\nserver.on('end', function(req, res, time) {\n  console.log('********************************');\n  console.log('Response completed in ' + time + ' seconds');\n  console.log('********************************');\n});\n\n```\n\nMiddleware error handling\n=========================\n\nThe Middleware function has access to Journeyman itself through `this`.\n\nIn your middleware you should handle errors by calling 'this.handleError' with request, response and an error string.\n\n\nMiddleware time profiling\n=========================\n\nJourneyman will also emit events at the beginning and end of each middleware\n\n```javascript\nserver.use(function(req, res, next) {\n  res.params = 'WHERE AM I??';\n  next();\n}, 'middleware name');\n```\n\nMiddleware name will default to 'default' if it is not set.\n\nEvents\n------\n\n\"startMiddleware\"\n\n```javascript\nserver.on('startMiddleware', function(req, res, name) {\n  console.log('********************************');\n  console.log('Middleware: ' + name + ' has started');\n  console.log('********************************');\n});\n```\n\n\"endMiddleware\"\n\n```javascript\nserver.on('endMiddleware', function(req, res, name, time) {\n  console.log('********************************');\n  console.log('Middleware: ' + name + ' completed in ' + time + ' seconds');\n  console.log('********************************');\n});\n```\n","readmeFilename":"README.md","bugs":{"url":"https://github.com/bthesorceror/journeyman/issues"},"_id":"journeyman@0.0.8","dist":{"shasum":"bb58c0d9910657d6a8b4a4be4d6b0ef7a85d211c","tarball":"https://registry.npmjs.org/journeyman/-/journeyman-0.0.8.tgz","integrity":"sha512-25ch9H4ySjS51TQDNhP8uwTWBj7iVYwEIueoGbhAiJywf8b2EPsP772W0mMVWl4kwz/V0jTp0xLPTm5UjOzbYw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDPelxAGuTgkw8Ym6v6z/CFUfNC95kPbsO1LrUJZIwqqwIgS3nRsZwZlsYEUWIqhWEEpxmyDdKCVaxiOqw62cUmbU4="}]},"_from":".","_npmVersion":"1.2.32","_npmUser":{"name":"bthesorceror","email":"bthesorceror@gmail.com"},"maintainers":[{"name":"bthesorceror","email":"bthesorceror@gmail.com"}]},"0.0.9":{"name":"journeyman","version":"0.0.9","description":"thin wrapper for middleware with node's http server","main":"index.js","scripts":{"test":"export NODE_ENV=test; mocha && echo '\nCucumber Features\n' && ./node_modules/.bin/cucumber.js"},"repository":{"type":"git","url":"git://github.com/bthesorceror/journeyman.git"},"devDependencies":{"mocha":"~1.8.1","sinon":"~1.5.2","zombie":"~2.0.0-alpha19","cucumber":"~0.3.1"},"author":{"name":"Brandon Farmer"},"license":"BSD","dependencies":{},"readme":"# Journeyman\n\n[![Build Status](https://travis-ci.org/bthesorceror/journeyman.png?branch=master)](https://travis-ci.org/bthesorceror/journeyman)\n\nthin wrapper for middleware with node's http server\n\n## Example\n\n```javascript\nvar Journeyman = require('journeyman');\n\nvar port = 3000,\n    server = new Journeyman(port);\n\nserver.use(function(req, res) {\n  res.writeHead(200);\n  res.end(res.params);\n});\n\nserver.use(function(req, res, next) { next(); });\n\nserver.use(function(req, res, next) {\n  res.params = 'WHERE AM I??';\n  next();\n});\n\nserver.listen();\n```\n\ngoing to http://localhost:3000 will render out a success with the contents \"WHERE AM I??\"\n\n## SSL support\n\nPass the path to both the ssl key and certificate\n\n```javascript\nvar journeyman = new Journeyman(3001, { key: 'path/to/key', cert: 'path/to/certificate' });\n```\n\n## Now with time profiling\n\nJourneyman will emit events at the start and end of every request-response cycle\n\n### The `Start` Event\n\n```javascript\nserver.on('start', function(req, res) {\n  console.log('********************************');\n  console.log('Response started');\n  console.log('********************************');\n});\n```\n\n### The `End` Event\n\n```javascript\nserver.on('end', function(req, res, time) {\n  console.log('********************************');\n  console.log('Response completed in ' + time + ' seconds');\n  console.log('********************************');\n});\n```\n\n## Middleware error handling\n\nThe Middleware function has access to Journeyman itself through `this`.\n\nIn your middleware you should handle errors by calling 'this.handleError' with request, response and an error string.\n\n\n## Middleware time profiling\n\nJourneyman will also emit events at the beginning and end of each middleware\n\n```javascript\nserver.use(function(req, res, next) {\n  res.params = 'WHERE AM I??';\n  next();\n}, 'middleware name');\n```\n\nMiddleware name will default to 'default' if it is not set.\n\n### The `startMiddleware` Event\n\n```javascript\nserver.on('startMiddleware', function(req, res, name) {\n  console.log('********************************');\n  console.log('Middleware: ' + name + ' has started');\n  console.log('********************************');\n});\n```\n\n### The `endMiddleware` Event\n\n```javascript\nserver.on('endMiddleware', function(req, res, name, time) {\n  console.log('********************************');\n  console.log('Middleware: ' + name + ' completed in ' + time + ' seconds');\n  console.log('********************************');\n});\n```\n\n## Available middleware\n\n- [rivulet](http://github.com/bthesorceror/rivulet) -- For easy server sent events\n- [lightning_strike](http://github.com/bthesorceror/lightning_strike) -- For serving static content\n- [rudder](http://github.com/bthesorceror/rudder) -- For http routing\n","readmeFilename":"README.md","bugs":{"url":"https://github.com/bthesorceror/journeyman/issues"},"_id":"journeyman@0.0.9","dist":{"shasum":"1f61a83920359046cf4b2406d5be09d2ca934555","tarball":"https://registry.npmjs.org/journeyman/-/journeyman-0.0.9.tgz","integrity":"sha512-cFFbbHr97EpLYDSnDTa3Hq26b4rv15jKeXKIhiVbD3dBepTTTiRsxdIp1gkPOp/U2e+I+aFqd5kefgp7GvtWPg==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDYax5fAod7ctFdpKXg022ey87N/GGBbNm321bhisorWwIgEUt5X4iDzjzhNwtXdZ7cJe6sYlQpRhDcC9beqBuW5bc="}]},"_from":".","_npmVersion":"1.3.5","_npmUser":{"name":"bthesorceror","email":"bthesorceror@gmail.com"},"maintainers":[{"name":"bthesorceror","email":"bthesorceror@gmail.com"}]}},"readme":"Journeyman\n=======\n\n[![Build Status](https://travis-ci.org/bthesorceror/journeyman.png?branch=master)](https://travis-ci.org/bthesorceror/journeyman)\n\nthin wrapper for middleware with node's http server\n\nExample\n==============================\n\n```ruby\nvar Journeyman = require('../index.js');\n\nvar port = 3000,\n    server = new Journeyman(port);\n\nserver.use(function(req, res) {\n  res.writeHead(200);\n  res.end(res.params);\n});\n\nserver.use(function(req, res, next) { next(); });\n\nserver.use(function(req, res, next) {\n  res.params = 'WHERE AM I??';\n  next();\n});\n\nserver.listen();\n```\n\ngoing to http://localhost:3000 will render out a success with the contents \"WHERE AM I??\"\n","maintainers":[{"name":"bthesorceror","email":"bthesorceror@gmail.com"}],"time":{"modified":"2022-06-19T04:50:13.156Z","created":"2013-01-15T17:29:59.249Z","0.0.1":"2013-01-15T17:30:00.080Z","0.0.2":"2013-05-29T11:59:50.578Z","0.0.3":"2013-05-30T10:32:42.107Z","0.0.4":"2013-07-30T16:34:24.645Z","0.0.5":"2013-08-01T20:42:05.895Z","0.0.6":"2013-08-17T17:21:50.832Z","0.0.7":"2013-08-21T13:44:56.184Z","0.0.8":"2013-08-21T15:34:36.823Z","0.0.9":"2013-10-31T17:37:21.667Z"},"author":{"name":"Brandon Farmer"},"repository":{"type":"git","url":"git://github.com/bthesorceror/journeyman.git"}}