{
  "author": {
    "name": "Marak Squires",
    "email": "marak.squires@gmail.com"
  },
  "name": "hook.io",
  "version": "0.8.11",
  "repository": {
    "type": "git",
    "url": "git://github.com/hookio/hook.io.git"
  },
  "contributors": [
    {
      "name": "Charlie Robbins",
      "email": "charlie@nodejitsu.com"
    },
    {
      "name": "Jameson Lee",
      "email": "jameson@nodejitsu.com"
    },
    {
      "name": "Joshua Holbrook",
      "email": "josh.holbrook@gmail.com"
    }
  ],
  "main": "./lib/hookio",
  "bin": {
    "hook": "./bin/hookio",
    "hookio": "./bin/hookio"
  },
  "engines": {
    "node": ">= v0.4.7"
  },
  "dependencies": {
    "async": "0.1.x",
    "colors": "0.x.x",
    "eventemitter2": "0.4.x",
    "optimist": "0.2.x",
    "nconf": "0.3.x",
    "npm": "~1.1.x",
    "pkginfo": "0.2.x",
    "mkdirp": "0.2.x",
    "semver": "1.0.x",
    "prompt": "0.1.x",
    "portfinder": "0.2.x",
    "weak": "0.1.5",
    "socket.io": "0.9.6",
    "socket.io-client": "0.9.6",
    "lazy": ">=1.0.5 <1.1",
    "traverse": "0.6.x",
    "jsonify": "0.0.x",
    "winston": "0.5.10",
    "union": "0.3.x",
    "ecstatic": "0.1.x"
  },
  "optionalDependencies": {
    "union": "0.3.x",
    "ecstatic": "0.1.x"
  },
  "scripts": {
    "test": "vows test/**/*-test.js --spec"
  },
  "browserify": {
    "base": "./lib",
    "main": "./lib/hookio.js"
  },
  "devDependencies": {
    "eyes": "0.1.x",
    "findit": "0.x.x",
    "forever": "0.6.x",
    "hook.io-helloworld": "0.3.x",
    "vows": "0.5.x >=0.5.10",
    "browserify": "1.10.x",
    "dnode": "0.9.11",
    "shimify": "0.0.x"
  },
  "readme": "\n<img src=\"http://i.imgur.com/S2rgr.png\"></img>\n\n    \n## hook.io is a versatile distributed event emitter built with node.js\n\n## hooks are nodes which can seamlessly work together across any device or network to create self-healing meshes of i/o\n\n## Features :\n\n- **Build applications intelligently by combining together small hook actors**\n- **Rapidly compose new functionality in a distributed and organized way**\n- **Dead simple Inter Process Communication built on-top of node's native [EventEmitter][2] class**\n- **Supports a large amount of common i/o sources out of the box**\n- **Additional i/o support from a rich community and network of user-created [hook libraries](https://github.com/hookio/hook.io/wiki/Hook.io-Libraries)**\n- **Built-in auto-discovery systems using http, tcp, mdns, and [hnet](http://github.com/hookio/hnet)**\n- **Hooks can exist on any device that supports JavaScript (cross-browser support via [socket.io][1])**\n- **Seamlessly manages the spawning and daemonizing additional hooks**\n- **Legacy applications can easily be extended to work with hook.io**\n\n# Installation\n\n     [sudo] npm install hook.io -g\n\n# Usage\n\nIf you are impatient and wish to jump straight to code, we have hundreds of code examples available here: [https://github.com/hookio/hook.io/tree/master/examples](https://github.com/hookio/hook.io/tree/master/examples)\n\n- [using hook.io as a node.js script or as the hook binary](#script-versus-binary)\n- [hook.io repl](#hook-repl)\n- [hook configuration / construction](#basic-config-construct)\n- [auto-discovery](#auto-discover)\n- [messaging](#basic-messaging)\n- [using PIPES](#hook-pipes)\n- [using mdns](#hook-mdns)\n- [enabling autohealing meshes](#hook-autoheal)\n- [tapping into the hook.io library network](#hook-libraries)\n\n<a name=\"script-versus-binary\"></a>\n## How to use hook.io as a node.js script or as the `hook` binary\n\nhook.io works well as both the `hook` binary or required and used programmatically through node.js \n\nTo use the `hook` binary simple type this on your terminal:\n\n     hook\n\nThis will start up your first hook!\n\nTo execute this same action programtically we would create a myhook.js file that contained: \n\n```\nvar hookio = require('hook.io'),\n    hook   = hookio.createHook();\n\n    hook.start();\n\n```\n<a name=\"hook-repl\"></a>\n## hook repl\n\nThe hook repl provides an easy way to interact with a live hook.io mesh.\n\nSimply type:\n\n     hook --repl\n\n**repl img here**\n\n<a name=\"hook-config-construct\"></a>\n## hook configuration\n\n<a name=\"hook-messaging\"></a>\n## hook messaging \n\n**Note:** This is only one, small, example.\n\nTo see all other supported types of hook messaging ( including EventEmitter and Callback style ), see: [https://github.com/hookio/hook.io/tree/master/examples/messaging](https://github.com/hookio/hook.io/tree/master/examples/messaging)\n\n**hook a**\n\n``` js\nvar hookio = require('hook.io');\n\nvar hookA = hookio.createHook({\n  name: \"a\"\n});\nhookA.on('*::sup', function(data){\n  // outputs b::sup::dog\n  console.log(this.event + ' ' + data);\n});\nhookA.start();\n```\n\n**hook b**\n``` js\nvar hookB = hookio.createHook({\n  name: \"b\"\n});\nhookB.on('hook::ready', function(){\n  hookB.emit('sup', 'dog');\n});\nhookB.start();\n```\n\n<a name=\"hook-pipes\"></a>\n## piping stdout and stdin through unix pipes\n\n### pipe stdin to hookio\n\n    tail foo.txt -f | hook \n    \n**hook.io will now emit stdin data as separate hook events**\n\n    \n### pipe hook.io events to stdout\n\n    hook -p | less\n\nUsing the `-p` option, hook.io will stream events to stdout as `\\n` delimited JSON documents. Each document represents a single hook event.\n\n**example stdout:**\n\n    {\"name\":\"the-hook\",\"event\":\"the-hook::sup\",\"data\":{\"foo\":\"bar\"}}\n\n<a name=\"hook-mdns\"></a>\n## multicast dns ( mdns )\n\n[Multicast DNS (mdns)](http://en.wikipedia.org/wiki/Multicast_DNS) is a way of using [DNS](http://en.wikipedia.org/wiki/Domain_Name_System) programming interfaces, packet formats and operating semantics on a small network where no DNS server is running. The mDNS protocol is used by Apple's <a href=\"http://en.wikipedia.org/wiki/Bonjour_(software)\">Bonjour<a/> and Linux <a href=\"http://en.wikipedia.org/wiki/Avahi_(software)\">Avahi<a/> service discovery systems. mdns is an easy way to help networked devices find each other without any prior configuration.\n\nhook.io has built-in experimental mdns support. This is intended to work on all operating systems and is intented for a way to provide<a href=\"http://en.wikipedia.org/wiki/Zeroconf\">zero configuration networking</a> discovery and connection of hooks over a [Local Area Network](http://en.wikipedia.org/wiki/Local_area_network) ( LAN )\n\n**IMPORTANT**\n\nBefore you can use the mdns feature, you will need to install a few additional dependencies.\n\n     npm install mdns@0.0.4\n\nMacOS and Windows should work out of the box. If you are running Linux, you may need to install the following libraries.\n\n     apt-get install libavahi-compat-libdnssd-dev\n\n**using mdns**\n\nComputer 1\n\n     hookio -m\n\n\nComputer 2\n\n    hookio -m\n\nNow these two computers ( connected over a LAN, with no central DNS server ) will automatically discovery each other and begin to transmit messages. Think of the possibilities!\n\n<a name=\"hook-libraries\"></a>\n\n# Hook Libraries\n\nWiki: [https://github.com/hookio/hook.io/wiki/Hook.io-Libraries](https://github.com/hookio/hook.io/wiki/Hook.io-Libraries)\n\nYou can also search [http://search.npmjs.org/](http://search.npmjs.org/) for \"hook.io\" ( although there are so many matches already, the search interface can't display them all.. )\n\n## Tests\n\nAll tests are written with [vows](http:://vowsjs.org) and require that you link hook.io to itself:\n\n``` bash\n  $ cd /path/to/hook.io\n  $ [sudo] npm link\n  $ [sudo] npm link hook.io\n  $ npm test\n```\n## Additional Resources\n\n - Email List: [http://groups.google.com/group/hookio][0]\n - Video Lessons: [http://youtube.com/maraksquires](http://youtube.com/maraksquires) ( [mirror](https://github.com/hookio/tutorials) )\n - Wiki Pages [https://github.com/hookio/hook.io/wiki/_pages](https://github.com/hookio/hook.io/wiki/_pages) \n - [hook.io for dummies](http://ejeklint.github.com/2011/09/23/hook.io-for-dummies-part-1-overview/)\n - [Distribute Node.js Apps with hook.io: ][6]\n - #nodejitsu on irc.freenode.net\n \n\n## Core Contributors ( https://github.com/hookio/hook.io/contributors )\n\n\n## MIT License\n\nCopyright (c) Nodejitsu\n\nPermission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the \"Software\"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n\n[0]: http://groups.google.com/group/hookio\n[1]: http://socket.io\n[2]: https://github.com/hij1nx/EventEmitter2\n[3]: http://github.com/SubStack/dnode\n[4]: https://github.com/indexzero/forever\n[5]: http://www.twilio.com/\n[6]: http://blog.nodejitsu.com/distribute-nodejs-apps-with-hookio\n",
  "_id": "hook.io@0.8.11",
  "description": "<img src=\"http://i.imgur.com/S2rgr.png\"></img>",
  "dist": {
    "shasum": "a1f702187ea0e50c37593342be1450b3b06e55fb",
    "tarball": "http://registry.npmjs.org/hook.io/-/hook.io-0.8.11.tgz"
  },
  "maintainers": [
    {
      "name": "marak",
      "email": "marak.squires@gmail.com"
    },
    {
      "name": "indexzero",
      "email": "charlie.robbins@gmail.com"
    }
  ],
  "directories": {},
  "_shasum": "a1f702187ea0e50c37593342be1450b3b06e55fb",
  "_from": "hook.io@*",
  "_resolved": "https://registry.npmjs.org/hook.io/-/hook.io-0.8.11.tgz"
}
