{"maintainers":[{"name":"nopersonsmodules","email":"nopersonsmodules@gmail.com"}],"dist-tags":{"latest":"0.1.0"},"author":{"name":"Dominic Tarr","email":"dominic.tarr@gmail.com","url":"dominictarr.com"},"description":"peer2peer nodejs applications","readme":"#peers\n\na simple peer-to-peer framework.\n\nreplicate dynamic data through a trusted network with a gossip protocol and [crdt](http://github.com/dominictarr/crdt)\n\n## Usage\n\n``` js\n\npeers()\n  .use(function name (stream, other) {\n    //plugin style, can stream to other side.\n  })\n  .connect(initial_port, initial_host)\n  .connect(initial_port2)   //.. as many as you like...\n  .listen(port, host)       //port to listen on.\n\n```\n\npeers needs to know a it's id, a file where it can persist it's data, \nan address to listen on, and an initial address to connect to.\n\nthe first time you run a peer, pass these as options.\n\n``` sh\n\n./cli.js --id TEST1 --file ./TEST1.crdt --host localhost:4000\n```\nthe peer will persist this information about it self, and the second time you run a peer\nyou only need to pass the file\n\n``` sh\n./cli.js --file ./TEST1.crdt\n```\n\nonce you have one peer running, tell another to connect to it!\n\n``` sh\n\n./cli.js --id TEST2 --file ./TEST2.crdt --host localhost:4001 --init 4000\n\n```\n\nyou only need to introduce a peer the first time, once it's connected to the network,\nit will learn about other peers, and it will connect to them next time.\nalthough, if their addresses have all changed, then you will need to introduce it again.\n\n","repository":{"type":"git","url":"https://github.com/dominictarr/peers.git"},"users":{},"versions":{"0.1.0":{"name":"peers","version":"0.1.0","description":"peer2peer nodejs applications","homepage":"http://github.com/dominictarr/peers","repository":{"type":"git","url":"https://github.com/dominictarr/peers.git"},"dependencies":{"crdt":"~3.0.0","optimist":"~0.3.4","through":"~0.1.4","mux-demux":"~3.3.2","node-uuid":"~1.3.3","event-stream":"~3.0.4"},"devDependencies":{},"author":{"name":"Dominic Tarr","email":"dominic.tarr@gmail.com","url":"dominictarr.com"},"_id":"peers@0.1.0","dist":{"shasum":"faef0c22210478e7cf376c614bbc03126bab7460","size":8022,"noattachment":false,"tarball":"http://tools.bpmhome.cn:8082/nexus/repository/npm-lc/peers/-/peers-0.1.0.tgz"},"_npmVersion":"1.1.59","_npmUser":{"name":"dominictarr","email":"dominic.tarr@gmail.com"},"maintainers":[{"name":"nopersonsmodules","email":"nopersonsmodules@gmail.com"}],"directories":{},"publish_time":1347391676212,"_cnpm_publish_time":1347391676212,"_hasShrinkwrap":false}},"name":"peers","time":{"modified":"2018-10-22T01:01:26.848Z","created":"2012-09-11T19:27:56.212Z","0.1.0":"2012-09-11T19:27:56.212Z"},"homepage":"http://github.com/dominictarr/peers"}