{"_id":"ghost-town","_rev":"32-c1305d7cddc70c5483287e69603d0faa","name":"ghost-town","description":"Simple queued & clustered PhantomJS processing.","dist-tags":{"latest":"3.0.0"},"versions":{"0.9.0":{"name":"ghost-town","version":"0.9.0","description":"Simple queued PhantomJS clustering.","keywords":["cluster","phantomjs"],"homepage":"https://github.com/buzzvil/ghost-town","bugs":{"url":"https://github.com/buzzvil/ghost-town/issues"},"license":"MIT","author":{"name":"Teddy Cross","email":"teddy@tkaz.ec","url":"http://tkaz.ec"},"main":"./index","repository":{"type":"git","url":"git://github.com/buzzvil/ghost-town"},"dependencies":{"phantom":"~0.5.7"},"engines":{"node":"~0.10.26","npm":"~1.4.3"},"_id":"ghost-town@0.9.0","dist":{"shasum":"901f237856ef22bea3389bca25e6eab8d9fef8d8","tarball":"https://registry.npmjs.org/ghost-town/-/ghost-town-0.9.0.tgz","integrity":"sha512-oPaTNsuahC+v1/AjDTbj77Y/lnxMiWGaDWmUMg3vRfEAa6kwTJOcCryW19O7/ZVuIWx4+khj4caQEv7Gu7bcFA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCICpebcPgVXkFEbWdHkKjclNxg+hQXfK82xdhaSCx96ubAiBPl5ZB9O1+tycj6fXQBK6VzStxtpPXs8mGND3SDYnPYw=="}]},"_from":".","_npmVersion":"1.4.3","_npmUser":{"name":"tkazec","email":"tkazec@gmail.com"},"maintainers":[{"name":"tkazec","email":"tkazec@gmail.com"}]},"1.0.0":{"name":"ghost-town","version":"1.0.0","description":"Simple queued & clustered PhantomJS processing.","keywords":["cluster","phantomjs"],"homepage":"https://github.com/buzzvil/ghost-town","bugs":{"url":"https://github.com/buzzvil/ghost-town/issues"},"license":"MIT","author":{"name":"Teddy Cross","email":"teddy@tkaz.ec","url":"http://tkaz.ec"},"main":"./index","repository":{"type":"git","url":"git://github.com/buzzvil/ghost-town"},"dependencies":{"phantom":"~0.5.7"},"engines":{"node":"~0.10.26","npm":"~1.4.3"},"_id":"ghost-town@1.0.0","dist":{"shasum":"9f6a480d18918dedad56a08259470925dbce6426","tarball":"https://registry.npmjs.org/ghost-town/-/ghost-town-1.0.0.tgz","integrity":"sha512-tnUtMTJN60zf5ah27NeeVPY9/wniHW8NYjXBSJrW3sGzrjJSXQk5He6+mQ6yYDdCGqxyaA8lwKgbYb3pgSGnow==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIAmXJu0fcmPPAx/WLZMv0Y7f6p25VQ06ir0XauOouO9IAiAd8qyrgrtS/nuRjOh0pkCOP0Hy6AABJCHMOLYt3H/PJg=="}]},"_from":".","_npmVersion":"1.4.3","_npmUser":{"name":"tkazec","email":"tkazec@gmail.com"},"maintainers":[{"name":"tkazec","email":"tkazec@gmail.com"}]},"1.1.0":{"name":"ghost-town","version":"1.1.0","description":"Simple queued & clustered PhantomJS processing.","keywords":["cluster","phantomjs"],"homepage":"https://github.com/buzzvil/ghost-town","bugs":{"url":"https://github.com/buzzvil/ghost-town/issues"},"license":"MIT","author":{"name":"Teddy Cross","email":"teddy@tkaz.ec","url":"http://tkaz.ec"},"main":"./index","repository":{"type":"git","url":"git://github.com/buzzvil/ghost-town"},"dependencies":{"phantom":"~0.5.7"},"engines":{"node":"~0.10.26","npm":"~1.4.6"},"_id":"ghost-town@1.1.0","_shasum":"6cb88fe0ae503087aaf9d704e084fd7b2167c992","_from":".","_npmVersion":"1.4.7","_npmUser":{"name":"tkazec","email":"teddy@tkaz.ec"},"maintainers":[{"name":"tkazec","email":"tkazec@gmail.com"}],"dist":{"shasum":"6cb88fe0ae503087aaf9d704e084fd7b2167c992","tarball":"https://registry.npmjs.org/ghost-town/-/ghost-town-1.1.0.tgz","integrity":"sha512-BPVFCv8fDY3FtA/wfEuJTQThfvtLXfRlhBMrI2JDKv+6bQuawfYzyk+B2UezTrT3B9cYqln4LUHj+gc5rNQlvw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCyc46chJXZoRx04JrYDjwGSrNQQDErhYhLtlSUMnKzEAIgSYF9vbQVqFYgDYv9GIzWwEi0FlinsA5JBvdzXuodi0A="}]}},"1.1.1":{"name":"ghost-town","version":"1.1.1","description":"Simple queued & clustered PhantomJS processing.","keywords":["cluster","phantomjs","queue"],"homepage":"https://github.com/buzzvil/ghost-town","bugs":{"url":"https://github.com/buzzvil/ghost-town/issues"},"license":"MIT","author":{"name":"Teddy Cross","email":"teddy@tkaz.ec","url":"http://tkaz.ec"},"main":"./index","repository":{"type":"git","url":"git://github.com/buzzvil/ghost-town"},"dependencies":{"phantom":"~0.6.3"},"engines":{"node":"~0.10.28","npm":"~1.4.10"},"gitHead":"471253470e7aaa4d31d6deef23b7e466223b130e","_id":"ghost-town@1.1.1","scripts":{},"_shasum":"8d185a8cdabb87d2aecb0b56938fac01709ebf4c","_from":".","_npmVersion":"1.4.13","_npmUser":{"name":"tkazec","email":"teddy@tkaz.ec"},"maintainers":[{"name":"tkazec","email":"tkazec@gmail.com"}],"dist":{"shasum":"8d185a8cdabb87d2aecb0b56938fac01709ebf4c","tarball":"https://registry.npmjs.org/ghost-town/-/ghost-town-1.1.1.tgz","integrity":"sha512-GFUJi685Rkh+pJ1WV56dTxpH0Ty72RjRBiWvv2/1j8gF8W1pT1uqs4eiRh2Q/7G3QzCB2fjPLJTp+ggbdQ9ZDg==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIBWcfLbpK8DCMUwjI4fxE8PMh8b2SRCsJejR8eVhI1gYAiEAxv1MwHgSyfwpAD0BPmLpBpvVIRDtAwq7UsWbv4PeBBI="}]}},"1.2.0":{"name":"ghost-town","version":"1.2.0","description":"Simple queued & clustered PhantomJS processing.","keywords":["cluster","phantomjs","queue"],"homepage":"https://github.com/buzzvil/ghost-town","bugs":{"url":"https://github.com/buzzvil/ghost-town/issues"},"license":"MIT","author":{"name":"Teddy Cross","email":"teddy@tkaz.ec","url":"http://tkaz.ec"},"main":"./index","repository":{"type":"git","url":"git://github.com/buzzvil/ghost-town"},"dependencies":{"phantom":"~0.6.3"},"engines":{"node":"~0.10.28","npm":"~1.4.10"},"gitHead":"a581393bf4edc3fb0badea926cb9f37afe4f5f01","_id":"ghost-town@1.2.0","scripts":{},"_shasum":"68f0c52faec8653ba9cb2a5078414044c43f06e6","_from":".","_npmVersion":"2.1.6","_nodeVersion":"0.10.33","_npmUser":{"name":"tkazec","email":"teddy@tkaz.ec"},"maintainers":[{"name":"tkazec","email":"tkazec@gmail.com"}],"dist":{"shasum":"68f0c52faec8653ba9cb2a5078414044c43f06e6","tarball":"https://registry.npmjs.org/ghost-town/-/ghost-town-1.2.0.tgz","integrity":"sha512-GDEO7OCNd2u/knZFRnQyCN9gZrcAwuRUm7FDp+oTQTuBBmFACAw8OpRoENkOc85qILVRmoPaXFLrd4696GQYMw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIHBG2YuvdWET1Rczgk/HojdrUSA2kSUcg+8r62MO39YPAiEApR/JzqB81kIjjZVpEWOXsHqDENGrH90Vm+FnTK9IWrc="}]}},"2.0.0":{"name":"ghost-town","version":"2.0.0","description":"Simple queued & clustered PhantomJS processing.","keywords":["cluster","phantomjs","queue"],"homepage":"https://github.com/buzzvil/ghost-town","bugs":{"url":"https://github.com/buzzvil/ghost-town/issues"},"license":"MIT","author":{"name":"Teddy Cross","email":"teddy@tkaz.ec","url":"http://tkaz.ec"},"main":"./index","repository":{"type":"git","url":"git://github.com/buzzvil/ghost-town"},"scripts":{"test":"mocha -R list -s 60s"},"dependencies":{"phantom":"~0.7.2"},"devDependencies":{"async":"~0.9.0","chai":"~1.10.0","mocha":"~2.1.0"},"gitHead":"244b60a312124880010f56e253d9d0fbb4292022","_id":"ghost-town@2.0.0","_shasum":"3ea398d756cefdb583897630a906f56b76fcfc55","_from":".","_npmVersion":"2.4.1","_nodeVersion":"0.10.35","_npmUser":{"name":"tkazec","email":"teddy@tkaz.ec"},"maintainers":[{"name":"tkazec","email":"tkazec@gmail.com"}],"dist":{"shasum":"3ea398d756cefdb583897630a906f56b76fcfc55","tarball":"https://registry.npmjs.org/ghost-town/-/ghost-town-2.0.0.tgz","integrity":"sha512-9+l8NCpA7c0bnMowrjZWomYkIVyVWLSoTUEfHD9SPa0VwhL7Hpgmm2zCnaTA/xLZBc5UMjTXBigJR9DQnJ4sCg==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIGjhoPDp7WnHFCFz5Z9b7YPDY91zb9+QTlmKKv/vRuPGAiEAkuXr+yrWLQkumzYDKaLFAIZbTutKH7Yn3g3jKN8cXkM="}]}},"2.1.0":{"name":"ghost-town","version":"2.1.0","description":"Simple queued & clustered PhantomJS processing.","keywords":["cluster","phantomjs","queue"],"homepage":"https://github.com/buzzvil/ghost-town","bugs":{"url":"https://github.com/buzzvil/ghost-town/issues"},"license":"MIT","author":{"name":"Teddy Cross","email":"teddy@tkaz.ec","url":"http://tkaz.ec"},"main":"./index","repository":{"type":"git","url":"git://github.com/buzzvil/ghost-town"},"scripts":{"test":"mocha -R list -s 60s"},"dependencies":{"phantom":"~0.7.2"},"devDependencies":{"async":"~0.9.0","chai":"~1.10.0","mocha":"~2.1.0"},"gitHead":"c4e4149cb0e86a2fab19cff33733e4aea268be2e","_id":"ghost-town@2.1.0","_shasum":"a37479b3c390ed6eae83a8325e0115be638f3ef6","_from":".","_npmVersion":"2.6.0","_nodeVersion":"0.10.36","_npmUser":{"name":"tkazec","email":"teddy@tkaz.ec"},"maintainers":[{"name":"tkazec","email":"tkazec@gmail.com"}],"dist":{"shasum":"a37479b3c390ed6eae83a8325e0115be638f3ef6","tarball":"https://registry.npmjs.org/ghost-town/-/ghost-town-2.1.0.tgz","integrity":"sha512-+93z4OdVTkIvg04Lkb6hzDu+P+N+vsvfUXeGA+JEdEUKnTqMPNg7/DEk24T7Xd/uCvxwFA7HO5r/d+fLxffJcw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIGisikxP6EGhpVePiTHyssHcgj3xNWH4pbHtY/GaW256AiEA75KsT3JlGwnFpqZ9V8bw5j6Zm88DWmgNBRveZT80pFg="}]}},"3.0.0-rc.1":{"name":"ghost-town","version":"3.0.0-rc.1","description":"Simple queued & clustered PhantomJS processing.","keywords":["cluster","phantomjs","queue"],"homepage":"https://github.com/Buzzvil/ghost-town","bugs":{"url":"https://github.com/Buzzvil/ghost-town/issues"},"license":"MIT","author":{"name":"Teddy Cross","email":"teddy@teddy.io","url":"https://teddy.io"},"main":"./index","repository":{"type":"git","url":"git+https://github.com/buzzvil/ghost-town.git"},"scripts":{"test":"mocha -R list -s 60s"},"dependencies":{"phantom":"~2.1.12"},"devDependencies":{"async":"~2.0.0","chai":"~1.10.0","mocha":"~2.1.0"},"gitHead":"48d043d68645f2ece6813e9726982b8284e4d1e5","_id":"ghost-town@3.0.0-rc.1","_shasum":"f71b3319c131f906a4d3ff3e9f1364988e7f1723","_from":".","_npmVersion":"3.10.3","_nodeVersion":"6.3.0","_npmUser":{"name":"tkazec","email":"teddy@tkaz.ec"},"maintainers":[{"name":"tkazec","email":"tkazec@gmail.com"}],"dist":{"shasum":"f71b3319c131f906a4d3ff3e9f1364988e7f1723","tarball":"https://registry.npmjs.org/ghost-town/-/ghost-town-3.0.0-rc.1.tgz","integrity":"sha512-Z1hxxI9yf0KTgu0j2V/PDe9KkxhBJPrPkAAQbxRzjhr7hCyK0Yt3kYvAEiKu5+9gkzNyHKHB6La+mJbt395zAw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIDR2+9SBlbl9sV29N8k+tNJoh1yOqF7DNz0+iWJIsxKWAiAyi3TFBlexRZBFIbrWVfeyVJoW6yvPoydzRQWcsJLBEQ=="}]},"_npmOperationalInternal":{"host":"packages-12-west.internal.npmjs.com","tmp":"tmp/ghost-town-3.0.0-rc.1.tgz_1468915934723_0.7446658362168819"}},"3.0.0-rc.2":{"name":"ghost-town","version":"3.0.0-rc.2","description":"Simple queued & clustered PhantomJS processing.","keywords":["cluster","phantomjs","queue"],"homepage":"https://github.com/Buzzvil/ghost-town","bugs":{"url":"https://github.com/Buzzvil/ghost-town/issues"},"license":"MIT","author":{"name":"Teddy Cross","email":"teddy@teddy.io","url":"https://teddy.io"},"main":"./index","repository":{"type":"git","url":"git+https://github.com/buzzvil/ghost-town.git"},"scripts":{"test":"mocha -R list -s 60s"},"dependencies":{"phantom":"~2.1.12"},"devDependencies":{"async":"~2.0.0","chai":"~3.5.0","mocha":"~2.5.3"},"gitHead":"8524e5a156c827d12409b3443c686e17f1de5b6b","_id":"ghost-town@3.0.0-rc.2","_shasum":"aa0b2be1a31bc31f98efa90fdd9f091c1a6640de","_from":".","_npmVersion":"2.15.8","_nodeVersion":"4.4.7","_npmUser":{"name":"tkazec","email":"teddy@tkaz.ec"},"maintainers":[{"name":"tkazec","email":"tkazec@gmail.com"}],"dist":{"shasum":"aa0b2be1a31bc31f98efa90fdd9f091c1a6640de","tarball":"https://registry.npmjs.org/ghost-town/-/ghost-town-3.0.0-rc.2.tgz","integrity":"sha512-O+PCKb8nMf4+NtqGD1NhOJKnbAw1aiDcc5wyRynfYkfd/KvLApc5xU8L/n1TZTE6AjEyfNZOPK+wUZFcLdRZIw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIHDvsrUtsWEaX7Z1lZEoI7dH/4rvLUDXOUcBBMcWt3vmAiBUdP2krzyUitundTquZ+2PQ62fhkxhHWDLRMbhvld9BA=="}]},"_npmOperationalInternal":{"host":"packages-16-east.internal.npmjs.com","tmp":"tmp/ghost-town-3.0.0-rc.2.tgz_1469085623243_0.5595881340559572"}},"3.0.0":{"name":"ghost-town","version":"3.0.0","description":"Simple queued & clustered PhantomJS processing.","keywords":["cluster","phantomjs","queue"],"homepage":"https://github.com/Buzzvil/ghost-town","bugs":{"url":"https://github.com/Buzzvil/ghost-town/issues"},"license":"MIT","author":{"name":"Teddy Cross","email":"teddy@teddy.io","url":"https://teddy.io"},"main":"./index","repository":{"type":"git","url":"git+https://github.com/buzzvil/ghost-town.git"},"scripts":{"test":"mocha -R list -s 60s"},"dependencies":{"phantom":"~2.1.12"},"devDependencies":{"async":"~2.0.0","chai":"~3.5.0","mocha":"~2.5.3"},"_id":"ghost-town@3.0.0","_shasum":"bf4c3aebf8a37375e9bcb9279550068e19629e81","_from":".","_npmVersion":"3.10.3","_nodeVersion":"6.3.0","_npmUser":{"name":"tkazec","email":"teddy@tkaz.ec"},"maintainers":[{"name":"tkazec","email":"tkazec@gmail.com"}],"dist":{"shasum":"bf4c3aebf8a37375e9bcb9279550068e19629e81","tarball":"https://registry.npmjs.org/ghost-town/-/ghost-town-3.0.0.tgz","integrity":"sha512-28f+1XNs92P+qUarOifEuadUwGL9AdSg9VwH2LBKaYaARBqzbWtaUkQrg4PPevV4IYV6aTRLQXMxFpGmPx0WWg==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDOX0y8T9/c7/QR22jXD7unAs1+MBYDdBqeMLD4AWS8DAIhAJGyaZDQYMkPkWPqvlyVVx9lZiz6zv+FCQD8OyQVQae+"}]},"_npmOperationalInternal":{"host":"packages-12-west.internal.npmjs.com","tmp":"tmp/ghost-town-3.0.0.tgz_1469156197338_0.6738005941733718"}}},"readme":"[![license](https://img.shields.io/npm/l/ghost-town.svg?style=flat)](http://opensource.org/licenses/MIT) [![version](https://img.shields.io/npm/v/ghost-town.svg?style=flat)](https://www.npmjs.com/package/ghost-town) [![dependencies](https://img.shields.io/david/buzzvil/ghost-town.svg?style=flat)](https://david-dm.org/buzzvil/ghost-town)  \nSimple queued & clustered PhantomJS processing. https://www.npmjs.com/package/ghost-town\n\n*Now with 100% creepier dependencies! Check out Ghost Town 3's breaking changes in [CHANGELOG.md](CHANGELOG.md).*\n\n---\n\nNeed highly scalable PhantomJS processing? Ghost Town makes it frighteningly easy! For example, on-demand page rendering, dispatched through Thrift:\n\n    var town = require(\"ghost-town\")();\n    \n    if (town.isMaster) {\n        thrift.createServer(Renderer, {\n            render: function (html, width, height, next) {\n                town.queue({\n                    html: html,\n                    width: width,\n                    height: height\n                }, function (err, data) {\n                    next(err, !err && new Buffer(data, \"base64\"));\n                });\n            }\n        }).listen(1337);\n    } else {\n        town.on(\"queue\", function (page, data, next) {\n            // sequential page setup\n            // page.property(\"viewportSize\", ...)\n            // page.property(\"customHeaders\", ...)\n            // page.property(\"onLoadFinished\", ...)\n            // page.property(\"content\", ...)\n            \n            page.renderBase64(\"jpeg\").then(function (res) {\n                next(null, res);\n            }).catch(next);\n        });\n    }\n\nGhost Town uses Node's Cluster API, so the master and worker share their code. On the master side, queue items and handle their results. On the worker side, process items and return their results.\n\nRequires Node 4+ and PhantomJS 2.1+.\n\n---\n\n`town(options)`\n\n* `phantomBinary`: String path to the PhantomJS executable. Default: Automatic via `$PATH`.\n* `phantomFlags`: Object of strings to use for the PhantomJS options. Default: `{}`.\n* `workerCount`: Number of workers to maintain. One or two per CPU is recommended. Default: `4`.\n* `workerDeath`: Number of items to process before restarting a worker. Default: `25`.\n* `workerShift`: Number of milliseconds to wait before restarting a worker. Default: `-1` (forever).\n* `pageCount`: Number of pages to process at a time. If your processing is mostly asynchronous (vs. e.g. render blocked), increasing this is recommended. Default: `1`.\n* `pageDeath`: Number of milliseconds to wait before before requeuing an item. If your processing is time-sensitive, decreasing this is recommended. Default: `30000`.\n* `pageTries`: Number of times to retry items that have timed out. If your processing could fail forever, configuring this is recommended. Default: `-1` (unlimited).\n\nStarts Ghost Town and returns a `Master` or a `Worker` instance exposing the following.\n\n* `Master#isRunning` is set by `Master#start()` and `Master#stop()`.\n* `Master#isMaster` and `Worker#isMaster` can be used to separate master- and worker-specific code.\n* `Worker#phantom` is the PhantomJS wrapper object provided by [phantom](https://www.npmjs.com/package/phantom).\n\n`Master#start()` and `Master#stop()`  \nStarts or stops processing. These spawn or kill workers and PhantomJS processes, so they're useful for managing resource usage or gracefully shutting down Node.\n\n`Master#queue(data, [asap], next)`  \nQueue an item for processing by a worker. `data` is passed to `Worker!queue()`, and `next(err, data)` is called when complete. Optionally pass `true` to `asap` to prepend to the queue.\n\n`Worker!queue(page, data, next)`  \nFired when a worker receives an item to process. `page` is the PhantomJS page, `data` is what was passed to `Master#queue()`, and `next(err, data)` passes it back.\n\n---\n\n© 2016 [Buzzvil](http://www.buzzvil.com), shared under the [MIT license](http://www.opensource.org/licenses/MIT).\n","maintainers":[{"name":"tkazec","email":"tkazec@gmail.com"}],"time":{"modified":"2022-06-18T08:13:40.857Z","created":"2014-04-01T09:33:01.927Z","0.9.0":"2014-04-01T09:33:01.927Z","1.0.0":"2014-04-03T02:00:38.660Z","1.1.0":"2014-04-17T08:10:16.418Z","1.1.1":"2014-05-29T02:11:33.431Z","1.2.0":"2014-11-06T03:10:32.071Z","2.0.0":"2015-02-06T02:04:35.098Z","2.1.0":"2015-02-27T07:12:02.428Z","3.0.0-rc.1":"2016-07-19T08:12:14.941Z","3.0.0-rc.2":"2016-07-21T07:20:25.922Z","3.0.0":"2016-07-22T02:56:37.563Z"},"homepage":"https://github.com/Buzzvil/ghost-town","keywords":["cluster","phantomjs","queue"],"repository":{"type":"git","url":"git+https://github.com/buzzvil/ghost-town.git"},"author":{"name":"Teddy Cross","email":"teddy@teddy.io","url":"https://teddy.io"},"bugs":{"url":"https://github.com/Buzzvil/ghost-town/issues"},"license":"MIT","readmeFilename":"README.md","users":{"nexus11":true,"shieldax":true,"jits":true,"dannydouglass":true,"afelicioni":true,"ravitheja.avuku":true}}