{"versions":{"0.0.1":{"name":"autodeploy","description":"Simple wrapper to make it easy to automatically deploy newer versions of your web apps","tags":["deployment"],"version":"0.0.1","bugs":{"url":"http://github.com/190N/autodeploy/issues"},"licenses":[{"type":"MIT","url":"http://www.opensource.org/licenses/mit-license.php"},{"type":"GPL-3.0","url":"http://www.opensource.org/licenses/gpl-3.0.html"}],"author":{"name":"190N","email":"benjamin.j.grant@gmail.com"},"main":"index.js","repository":{"type":"git","url":"http://github.com/190N/autodeploy.git"},"dependencies":{"ms":"^0.7.0"},"gitHead":"8d805f34ed3afdedc10362bb86409904df6a0b64","homepage":"https://github.com/190N/autodeploy","_id":"autodeploy@0.0.1","scripts":{},"_shasum":"fc9dba85a142a64131d1aa11627fcabd73699a12","_from":".","_npmVersion":"2.3.0","_nodeVersion":"0.10.35","_npmUser":{"name":"anonymous","email":"benjamin.j.grant@gmail.com"},"maintainers":[{"name":"anonymous","email":"benjamin.j.grant@gmail.com"}],"dist":{"shasum":"fc9dba85a142a64131d1aa11627fcabd73699a12","tarball":"http://123.232.10.234:8212/nexus/content/groups/npm-public/autodeploy/-/autodeploy-0.0.1.tgz","size":14803,"integrity":"sha512-fR5wr1mukHJykLt7OAtTDUE+l6VYd7T0/nWHI3C1XcUJTW1Bvn4DZenGDkuT3B26Tyv+Tqp8sWfJ5U7HEJQx3Q=="},"directories":{},"_cnpmcore_publish_time":"2021-12-23T07:04:31.956Z","contributors":[]},"0.0.2":{"name":"autodeploy","description":"Simple wrapper to make it easy to automatically deploy newer versions of your web apps","tags":["deployment"],"version":"0.0.2","bugs":{"url":"http://github.com/190N/autodeploy/issues"},"licenses":[{"type":"MIT","url":"http://www.opensource.org/licenses/mit-license.php"},{"type":"GPL-3.0","url":"http://www.opensource.org/licenses/gpl-3.0.html"}],"author":{"name":"190N","email":"benjamin.j.grant@gmail.com"},"main":"index.js","repository":{"type":"git","url":"http://github.com/190N/autodeploy.git"},"dependencies":{"ms":"^0.7.0"},"gitHead":"c31a34a877fd446261d4e25012aa9b7a63085a9f","homepage":"https://github.com/190N/autodeploy","_id":"autodeploy@0.0.2","scripts":{},"_shasum":"dfab1e30f1233ff138f255409ec72cc90b278139","_from":".","_npmVersion":"2.3.0","_nodeVersion":"0.10.35","_npmUser":{"name":"anonymous","email":"benjamin.j.grant@gmail.com"},"maintainers":[{"name":"anonymous","email":"benjamin.j.grant@gmail.com"}],"dist":{"shasum":"dfab1e30f1233ff138f255409ec72cc90b278139","tarball":"http://123.232.10.234:8212/nexus/content/groups/npm-public/autodeploy/-/autodeploy-0.0.2.tgz","size":14806,"integrity":"sha512-q/cDjM01cO4JwSvV80jp/hnsLfnGfIDp1pGGm5v7Taw7tSAURRlHcafBdWWEmHwoUtS+xfa4HKr+WVd/LD7jNA=="},"directories":{},"_cnpmcore_publish_time":"2021-12-23T07:04:32.825Z","contributors":[]},"0.1.0":{"name":"autodeploy","description":"Simple wrapper to make it easy to automatically deploy newer versions of your web apps","tags":["deployment"],"version":"0.1.0","bugs":{"url":"http://github.com/190N/autodeploy/issues"},"licenses":[{"type":"MIT","url":"http://www.opensource.org/licenses/mit-license.php"},{"type":"GPL-3.0","url":"http://www.opensource.org/licenses/gpl-3.0.html"}],"author":{"name":"190N","email":"benjamin.j.grant@gmail.com"},"main":"index.js","repository":{"type":"git","url":"http://github.com/190N/autodeploy.git"},"dependencies":{"ms":"^0.7.0"},"gitHead":"3b14d2977af78afe2867020ee83a51ead15d6a43","homepage":"https://github.com/190N/autodeploy","_id":"autodeploy@0.1.0","scripts":{},"_shasum":"5bf568e942f1a385cbc3daa4d55123ec82853d0b","_from":".","_npmVersion":"2.3.0","_nodeVersion":"0.10.35","_npmUser":{"name":"anonymous","email":"benjamin.j.grant@gmail.com"},"maintainers":[{"name":"anonymous","email":"benjamin.j.grant@gmail.com"}],"dist":{"shasum":"5bf568e942f1a385cbc3daa4d55123ec82853d0b","tarball":"http://123.232.10.234:8212/nexus/content/groups/npm-public/autodeploy/-/autodeploy-0.1.0.tgz","size":14900,"integrity":"sha512-Buuke+qG83hHRGErs38heyXNp2uO8ZqoU3ykNKzBRmBxtey/uJLOivwJ7zw7qkERuou3L3l+e/hpXZExxvFNGw=="},"directories":{},"_cnpmcore_publish_time":"2021-12-23T07:04:33.698Z","contributors":[]},"0.1.1":{"name":"autodeploy","description":"Simple wrapper to make it easy to automatically deploy newer versions of your web apps","tags":["deployment"],"version":"0.1.1","bugs":{"url":"http://github.com/190N/autodeploy/issues"},"licenses":[{"type":"MIT","url":"http://www.opensource.org/licenses/mit-license.php"},{"type":"GPL-3.0","url":"http://www.opensource.org/licenses/gpl-3.0.html"}],"author":{"name":"190N","email":"benjamin.j.grant@gmail.com"},"main":"index.js","repository":{"type":"git","url":"http://github.com/190N/autodeploy.git"},"dependencies":{"ms":"^0.7.0"},"gitHead":"4336392064bcc1157d8a0d4259d347d45442cede","homepage":"https://github.com/190N/autodeploy","_id":"autodeploy@0.1.1","scripts":{},"_shasum":"5725f8bf4da5bf44b4340dcbd62d86d8bf0a3ce2","_from":".","_npmVersion":"2.3.0","_nodeVersion":"0.10.35","_npmUser":{"name":"anonymous","email":"benjamin.j.grant@gmail.com"},"maintainers":[{"name":"anonymous","email":"benjamin.j.grant@gmail.com"}],"dist":{"shasum":"5725f8bf4da5bf44b4340dcbd62d86d8bf0a3ce2","tarball":"http://123.232.10.234:8212/nexus/content/groups/npm-public/autodeploy/-/autodeploy-0.1.1.tgz","size":14910,"integrity":"sha512-Nq+UpCboI2b2dPcjURxAvxRsD+VHMTcXJ/npzvlA4qvXWFSnZVnBjBcbiJNeB2AjadE70cr6QcuS0EYdHlEr9A=="},"directories":{},"_cnpmcore_publish_time":"2021-12-23T07:04:34.576Z","contributors":[]}},"dist-tags":{"latest":"0.1.1"},"name":"autodeploy","time":{"created":"2022-01-27T00:37:16.285Z","modified":"2022-01-27T00:37:16.285Z","0.0.1":"2015-01-28T00:17:18.777Z","0.0.2":"2015-01-28T00:21:04.190Z","0.1.0":"2015-01-28T00:34:54.890Z","0.1.1":"2015-01-30T04:01:49.457Z"},"readme":"autodeploy\n==========\n\nSimple wrapper to make it easy to automatically deploy newer versions of your web apps\n\n## Installation\n```bash\nnpm install --save autodeploy\n```\n\n## What it Is\nAutodeploy is a wrapper around node's core `http` module to make it easy to\nroll your own (for example) Git-based deployment.\n\nSince many code-hosting sites offer hooks that they will make an HTTP request to\nwhen your code is changed, Autodeploy lets you set up a server on a different\nport that your code-hosting site can make requests to.\n\nWhile automated deployment is great, there are some concerns that need to be\naddressed. For instance, there may be some times of day where you know that your\napp will be under high load. You wouldn't want to restart your server during\nthose hours. Autodeploy provides a callback so you can decide if you want to\nrestart your app. If the callback returns `false`, it will keep calling your\ncallback at specified intervals, to make sure that the new code is eventually\ndeployed.\n\n## Usage\n`require('autodeploy')` returns a function that you call with options. That\nfunction then returns an instance of `http.Server`, which you can call `listen`\non to start the server. While Autodeploy won't fall apart if you start multiple\nservers (as long as they are on different ports), this is not recommended.\n\nExample:\n```js\n// import autodeploy\nvar autodeploy = require('autodeploy');\n\n// create the server\nvar server = autodeploy({\n    // called to see if it's a good time to restart the server\n    shouldRestart: function() {\n        console.log('shouldRestart called');\n        return Math.random() > 0.5;\n    },\n\n    // called when the app needs to restart\n    restart: function() {\n        console.log('restart called');\n        // fetch new code\n        // stop the app\n        // install dependencies\n        // start the app again\n    },\n\n    // specifies how often it should call shouldRestart if it returns false the first time\n    interval: 5000,\n\n    // path to listen on\n    path: '/restart'\n});\n\n// start it!\nserver.listen(8000);\nconsole.log('autodeploy listening at localhost:8000/restart');\n```\n\n## Options\nOptions are passed in as an object, the only argument to Autodeploy's exported\nfunction.\n\n### shouldRestart\n`shouldRestart` is called by Autodeploy the first time the request is made. It\nshould return `true` if it's a good time to restart the app, `false` otherwise.\n\nIf it returns `false` the first time, Autodeploy will keep calling it at the\ninterval specified.\n\nDefault: `function() { return true; }`\n\n### restart\n`restart` is the function that Autodeploy calls to restart your app.\n\nThis option is required. Autodeploy will throw an error if it is not specified.\n\n### interval\nThe delay between subsequent calls to `shouldRestart`. This should be either a\nnumber of milliseconds or a string understandable by the\n[ms](http://npmjs.com/package/ms) module.\n\nDefault: `10000`\n\n### path\nThe path that will restart your app.\n\nDefault: `'/'`\n\n### authorize\nA function to authorize the request. This is meant to support systems like\nGitHub's Webhooks, where your app is given a secret that you specify as\nauthorization. The function is passed the request object from node's `http`\nmodule as the only argument.\n\nDefault: `function() { return true; }`\n\n## License\nAutodeploy is dual-licensed under the\n[MIT](http://www.opensource.org/licenses/mit-license.php) and\n[GPL 3.0](http://www.opensource.org/licenses/gpl-3.0.html) licenses. This means\nthat you can use it in **any** package, no matter what license you are using.","users":{}}