{"_id":"ears","_rev":"28-e84bd66317aa807cfbf7e4b556b2cc34","name":"ears","description":"messaging framework for communicating with running node.js applications over http","dist-tags":{"latest":"0.3.1"},"versions":{"0.1.0":{"author":{"name":"Carson S. Christian","email":"cc@amplego.com"},"name":"ears","description":"communicate json data and commands to running applications from any local http source","keywords":["http","communicate","local","listen","running","commands"],"homepage":"https://github.com/cscade/Ears","version":"0.1.0","repository":{"type":"git","url":"git://github.com/cscade/Ears.git"},"main":"index","engines":{"node":"0.4.x"},"_npmJsonOpts":{"file":"/Users/cscade/.npm/ears/0.1.0/package/package.json","wscript":false,"contributors":false,"serverjs":false},"_id":"ears@0.1.0","dependencies":{},"devDependencies":{},"_engineSupported":true,"_npmVersion":"1.0.27","_nodeVersion":"v0.4.9","_defaultsLoaded":true,"dist":{"shasum":"8e7ea54fb1970aec9c96b5fecf2b26929a24230c","tarball":"https://registry.npmjs.org/ears/-/ears-0.1.0.tgz","integrity":"sha512-CF+GoFKEUv3vmu1vur5gzdEkRyH2jjN5J2K9NU/PONwAD4FikCjlyDe+3C85C1qgnGus1ixTDwPjSttbvUqyDA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIEcGKB3AaouRFknOB1QAMwKj2OmkvXZ4108sGoICNvIbAiB0oBLsu3qjC0QUbXbmW62pdn/djKMw2EgwnLANLUNWww=="}]},"maintainers":[{"name":"cscade","email":"cc@amplego.com"}],"directories":{}},"0.1.1":{"author":{"name":"Carson S. Christian","email":"cc@amplego.com"},"name":"ears","description":"communicate json data and commands to running applications from any local http source","keywords":["http","communicate","local","listen","running","commands"],"homepage":"https://github.com/cscade/Ears","version":"0.1.1","repository":{"type":"git","url":"git://github.com/cscade/Ears.git"},"main":"index","engines":{"node":"0.4.x"},"_npmJsonOpts":{"file":"/Users/cscade/.npm/ears/0.1.1/package/package.json","wscript":false,"contributors":false,"serverjs":false},"_id":"ears@0.1.1","dependencies":{},"devDependencies":{},"_engineSupported":true,"_npmVersion":"1.0.27","_nodeVersion":"v0.4.9","_defaultsLoaded":true,"dist":{"shasum":"b18ae0fbb4850c7599f115c57dd1cd0ff0cf19be","tarball":"https://registry.npmjs.org/ears/-/ears-0.1.1.tgz","integrity":"sha512-G8PFa74gcq75TpZlAhAp4sLrevF6a2L+YwP1ylW7pJvFL86dO1ORiHjJA2rncqXESwNvi/gcqrEeoOzjtX024A==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQD856jbDSepZzDB0k53E2QEKMFN4QE5zbeL+zV1vcIotgIgLS7csg3V6nFCkiFeoUYzd6XuO/6EwZWaz+8RN09lorY="}]},"maintainers":[{"name":"cscade","email":"cc@amplego.com"}],"directories":{}},"0.1.2":{"author":{"name":"Carson S. Christian","email":"cc@amplego.com"},"name":"ears","description":"communicate json data and commands to running applications from any local http source","keywords":["http","communicate","local","listen","running","commands"],"homepage":"https://github.com/cscade/Ears","version":"0.1.2","repository":{"type":"git","url":"git://github.com/cscade/Ears.git"},"main":"index","engines":{"node":"0.4.x"},"_npmJsonOpts":{"file":"/Users/cscade/.npm/ears/0.1.2/package/package.json","wscript":false,"contributors":false,"serverjs":false},"_id":"ears@0.1.2","dependencies":{},"devDependencies":{},"_engineSupported":true,"_npmVersion":"1.0.27","_nodeVersion":"v0.4.9","_defaultsLoaded":true,"dist":{"shasum":"53c1342654aadb812d4971f1a0e5dd812228c568","tarball":"https://registry.npmjs.org/ears/-/ears-0.1.2.tgz","integrity":"sha512-f421xqUZjQ1lrcBMaQ/mdtrzVWf/Dj1SaefxN4rriVkl9EpqREPnuvE9UnYu2IWz4eeRCj61WbUcxfhvDkfpGQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDPKDV6rK1G8P7eg0UbB5KmR8uDwPco9OHiQqZS/pCcYQIge+P7hpQOg9Wd3PL41BejxtZRNL9U0TtiGB1w70YIOhI="}]},"maintainers":[{"name":"cscade","email":"cc@amplego.com"}],"directories":{}},"0.1.3":{"author":{"name":"Carson S. Christian","email":"cc@amplego.com"},"name":"ears","description":"communicate json data and commands to running applications from any local http source","keywords":["http","communicate","local","listen","running","commands"],"homepage":"https://github.com/cscade/Ears","version":"0.1.3","repository":{"type":"git","url":"git://github.com/cscade/Ears.git"},"main":"index","engines":{"node":"0.4.x"},"_npmJsonOpts":{"file":"/Users/cscade/.npm/ears/0.1.3/package/package.json","wscript":false,"contributors":false,"serverjs":false},"_id":"ears@0.1.3","dependencies":{},"devDependencies":{},"_engineSupported":true,"_npmVersion":"1.0.27","_nodeVersion":"v0.4.9","_defaultsLoaded":true,"dist":{"shasum":"483f043710059e66720f3ad44cecb9ca51de75f3","tarball":"https://registry.npmjs.org/ears/-/ears-0.1.3.tgz","integrity":"sha512-Lq8j7S/6IxR4PEDRyN091KU7MKuT/Tw0Q0lu587CpC5Wc/8YIQDukMHMkF/QwB2guWEw9DK/lYrvTc8mIUlMyA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQC6elX9UDnH9emP0H0NpKYYFgSjMDaw1hSxM1GB+3c0aAIhAKbkTgnFhp9ru8+uYmIR4omZ1vnZeubQ6nufJrTzuXdB"}]},"maintainers":[{"name":"cscade","email":"cc@amplego.com"}],"directories":{}},"0.1.4":{"author":{"name":"Carson S. Christian","email":"cc@amplego.com"},"name":"ears","description":"communicate json data and commands to running applications from any local http source","keywords":["http","communicate","local","listen","running","commands"],"homepage":"https://github.com/cscade/Ears","version":"0.1.4","repository":{"type":"git","url":"git://github.com/cscade/Ears.git"},"main":"index","engines":{"node":"0.4.x"},"dependencies":{"portfinder":"0.2.x"},"_npmJsonOpts":{"file":"/Users/cscade/.npm/ears/0.1.4/package/package.json","wscript":false,"contributors":false,"serverjs":false},"_id":"ears@0.1.4","devDependencies":{},"_engineSupported":true,"_npmVersion":"1.0.27","_nodeVersion":"v0.4.9","_defaultsLoaded":true,"dist":{"shasum":"8a4e627a0ef6391fb1c4e270eb9bbc84a4a8d16f","tarball":"https://registry.npmjs.org/ears/-/ears-0.1.4.tgz","integrity":"sha512-KR6nV6WAyTMtlxHB6JE6iRDxhT95QNTlcH3W1AR+/fmDFBvYDfnUTK0PZOQRqsaJu/N2bzB+22BHOsHrV3jCdA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIG80vGJcyqfURkxuUlrlU79WHDUyFW1Hlrim3L0coaJ0AiAxai9m1yzklU4Z0wGD1xrJ6Ct/W5Cv4iekpBHvcdtB2w=="}]},"maintainers":[{"name":"cscade","email":"cc@amplego.com"}],"directories":{}},"0.2.2":{"author":{"name":"Carson S. Christian","email":"cc@amplego.com"},"name":"ears","description":"messaging framework for communicating with running node.js applications over http","keywords":["http","communicate","local","listen","running","commands"],"homepage":"https://github.com/cscade/Ears","version":"0.2.2","repository":{"type":"git","url":"git://github.com/cscade/Ears.git"},"main":"index","engines":{"node":"0.8.x"},"dependencies":{"portfinder":"0.2.x"},"devDependencies":{"mocha":"*"},"scripts":{"test":"mocha test -R spec"},"_id":"ears@0.2.2","dist":{"shasum":"7a3ded8f878559947679539673a1818d0ed05e47","tarball":"https://registry.npmjs.org/ears/-/ears-0.2.2.tgz","integrity":"sha512-ooBjZ2+AvacWGvtGP3uzLXQ97He74uXMt5PfUPesyG2dMqVXNrumhMcadgBJxc+4Zas7/6DbUIuCItcjonF7dA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIHN9orRT1Vf0VUS98LGi+lsKogFW9501ARlXcSZc3vs5AiArXwwLr4BJCoArlOIRiEtBFHLehmNb+xPfpx1Wt6avdg=="}]},"_npmVersion":"1.1.49","_npmUser":{"name":"cscade","email":"cc@amplego.com"},"maintainers":[{"name":"cscade","email":"cc@amplego.com"}]},"0.3.0":{"author":{"name":"Carson S. Christian","email":"cc@amplego.com"},"name":"ears","description":"messaging framework for communicating with running node.js applications over http","keywords":["http","communicate","local","listen","running","commands"],"homepage":"https://github.com/cscade/Ears","version":"0.3.0","repository":{"type":"git","url":"git://github.com/cscade/Ears.git"},"main":"index","engines":{"node":"0.8.x"},"dependencies":{"portfinder":"0.2.x"},"devDependencies":{"mocha":"*"},"scripts":{"test":"mocha test -R spec"},"_id":"ears@0.3.0","dist":{"shasum":"718a3a2ff53756c301f306d2af1c19d88e187a6b","tarball":"https://registry.npmjs.org/ears/-/ears-0.3.0.tgz","integrity":"sha512-wdkKaV+10lhSHMHTTttCXUXZ0VPj9VzySRjNgcp7R/dCDHAdjWwMhdi9d2Y4myE50/0whqR2jbnF0TBnaudsiQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQComywHb/q+uOaRBHizJNvBIUIknfu8wMjDbzIqa7vqCwIhAOB5j1ei/BfBQ3ScQAh4k81h9JKTtPjPlrP20QbNycFy"}]},"_npmVersion":"1.1.49","_npmUser":{"name":"cscade","email":"cc@amplego.com"},"maintainers":[{"name":"cscade","email":"cc@amplego.com"}]},"0.3.1":{"author":{"name":"Carson S. Christian","email":"cc@amplego.com"},"name":"ears","description":"messaging framework for communicating with running node.js applications over http","keywords":["http","communicate","local","listen","running","commands"],"homepage":"https://github.com/cscade/Ears","version":"0.3.1","repository":{"type":"git","url":"git://github.com/cscade/Ears.git"},"main":"index","engines":{"node":"0.8.x"},"dependencies":{"portfinder":"0.2.x"},"devDependencies":{"mocha":"*","winston":"*"},"scripts":{"test":"mocha test -R spec"},"_id":"ears@0.3.1","dist":{"shasum":"3e8cb94dfe5baa7eb3da7986a82532188aeae0e7","tarball":"https://registry.npmjs.org/ears/-/ears-0.3.1.tgz","integrity":"sha512-DPiwydxydih0KMYe/LnNnzxYXWQtNe6SOZeWPAtFErzgHSZqnqoMgx7hBe/7p9JB00G9B9E5XEYMBouQFv5zXQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIC6aSVWNXTrsHwzF88xOdB6RaAoRtmMgYofBO0pz/43QAiAtKChXIOq9q8kPNDi+LfGflhamzKRpS23035PbEcwugg=="}]},"_npmVersion":"1.1.49","_npmUser":{"name":"cscade","email":"cc@amplego.com"},"maintainers":[{"name":"cscade","email":"cc@amplego.com"}]}},"maintainers":[{"name":"cscade","email":"cc@amplego.com"}],"time":{"modified":"2022-06-16T03:18:17.707Z","created":"2011-09-15T14:07:44.898Z","0.1.0":"2011-09-15T14:07:45.514Z","0.1.1":"2011-09-15T19:23:27.322Z","0.1.2":"2011-09-15T19:54:53.526Z","0.1.3":"2011-09-22T16:39:47.698Z","0.1.4":"2011-09-22T20:29:19.388Z","0.2.2":"2012-08-23T17:12:15.360Z","0.3.0":"2012-08-29T16:44:02.155Z","0.3.1":"2012-08-29T18:03:38.815Z"},"author":{"name":"Carson S. Christian","email":"cc@amplego.com"},"repository":{"type":"git","url":"git://github.com/cscade/Ears.git"},"readme":"# Ears\n\nSimple listening plugin for node.js applications. Send messages to your running application in JSON over http.\n\n[![build status](https://secure.travis-ci.org/cscade/Ears.png)](http://travis-ci.org/cscade/Ears)\n\n## Installation\n\n\t$ npm install ears\n\n## Usage\n\nEars is very simple to use. It listens on your port of choice (or auto-detects a free port above 3999) on your address of choice (defaulting to INADDR_ANY) for incoming JSON POST requests. Ears is an EventEmitter, and will emit \"message\" on every incoming \"directive\". Your application can then respond to the event in any way it sees fit.\n\n````javascript\nvar Ears = require('ears');\n\nears = new Ears({ port: 3333 });\nears.on('testMessage', function (message) {\n\tconsole.log(message); // This is my test message!\n});\nears.listen();\n````\n\n\t$ curl localhost:3333 -H 'content-type: application/json' -d '{ \"directive\": \"testMessage\", \"message\": \"This is my test message!\" }'\n\t{\"ok\":true,\"message\":\"ok\"}\n\t$\n\n### Options\n\nOptions are passed on instance creation, i.e. `new Ears([options])`;\n\n`port: [null]`: Port to listen on, defaults to first available above 3999\n\n`verbose: [true]/false`: Talk about listening and incoming requests\n\n`messages.ok`: Response string on ok valid requests\n\n`messages.nok`: Response string on invalid requests\n\nIf you are using winston in your application, Ears can log to it rather than stdout:\n\n`winston.logger`: `winston`\n\n`winston.level`: 'info'\n\n### Methods\n\n#### listen([options], [callback])\n\n````javascript\n// Just listen\nears.listen();\n\n// Listen with a callback\nears.listen(function () {});\n\n// Listen on a specific address with a callback\nears.listen({\n\thost: '127.0.0.1' // Defaults to INADDR_ANY (all addresses on host)\n}, function () {});\n````\n\n#### muffs([callback])\n\n````javascript\n// Stop responding to requests, with an optional callback\nears.muffs();\nears.muffs(function () {});\n````\n\n### Response Codes\n\nIf you...\n\n\tsend a properly formed request with appropriate properties\t\t-> 200 OK\n\tsend a GET request\t\t\t\t\t\t\t\t\t\t\t\t-> 405 Method Not Allowed\n\tsend a POST request without application/json content type\t\t-> 400 Bad Request\n\tsend a JSON object missing the required properties\t\t\t\t-> 400 Bad Request\n\tsend malformed JSON\t\t\t\t\t\t\t\t\t\t\t\t-> 400 Bad Request\n\n## What can it do?\n\nI developed this module initially to provide a way to talk to production node.js applications from the command line\nusing cURL. By integrating Ears into applications, I can communicate graceful shutdown commands to node instances\nas part of deploy scripts, etc.\n\nSince it is not specialized to a particular purpose, it can be used anywhere it would be useful to convey messages or data\nvia JSON to a node.js application from the local host.\n\n## Test Coverage\n\nEars has a full test suite written for mocha. `npm install -g mocha` for access to the binary.\n\n## License \n\n(The MIT License)\n\nCopyright (c) 2011 Carson Christian &lt;cc@amplego.com&gt;\n\nPermission is hereby granted, free of charge, to any person obtaining\na copy of this software and associated documentation files (the\n'Software'), to deal in the Software without restriction, including\nwithout limitation the rights to use, copy, modify, merge, publish,\ndistribute, sublicense, and/or sell copies of the Software, and to\npermit persons to whom the Software is furnished to do so, subject to\nthe following conditions:\n\nThe above copyright notice and this permission notice shall be\nincluded in all copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,\nEXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\nMERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.\nIN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY\nCLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,\nTORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE\nSOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.","homepage":"https://github.com/cscade/Ears","keywords":["http","communicate","local","listen","running","commands"],"readmeFilename":""}