{"_id":"launch","_rev":"6-6621c2064beefb0625b076d2c165f964","name":"launch","description":"A command line deployment tool for sites/apps","dist-tags":{"latest":"0.0.1"},"versions":{"0.0.1":{"name":"launch","version":"0.0.1","author":{"name":"Ben Gourley"},"description":"A command line deployment tool for sites/apps","engines":{"node":"*"},"dependencies":{},"main":"index","_npmUser":{"name":"bengourley","email":"benleighgourley@gmail.com"},"_id":"launch@0.0.1","devDependencies":{},"_engineSupported":true,"_npmVersion":"1.0.104","_nodeVersion":"v0.4.12","_defaultsLoaded":true,"dist":{"shasum":"bed54644b55ca38f60dcd1faf1a7b868004c24ca","tarball":"https://registry.npmjs.org/launch/-/launch-0.0.1.tgz","integrity":"sha512-f+F4iHWQyIxRprqMBsQpCd6w37t/rEcVePPGFMEfBfEM9NXjF+0AZ7z03DtfWWkL31UrP57fucAUfFmNIrO1Hw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCID3uLd00EgV6Dyrn/NMPYVNqIguj7DKMGxTE0B1gi4saAiA8pQ4a44NUA0MFNqDjyL5IRYWNla73ybA1RthCCNXsEw=="}]},"maintainers":[{"name":"bengourley","email":"benleighgourley@gmail.com"}],"directories":{}}},"readme":"# launch – app deployment for node.js\n\nlaunch is an application deployment framework, essentially a lean set\nof [jake](https://github.com/mde/jake) tasks for deploying node apps.\n\nCurrently it is tiny, but very extensible.\n\n## Installation\n\nlaunch is for use on projects that have a `package.json` file in the root\nto manage their dependencies.\n\nAdd launch as a devDependency to your `package.json`, eg:\n\n```js\n\"devDependencies\" : {\n  \"launch\" : \">=0\"\n}\n```\n\nAnd then do\n  \n    cd /path/to/project && npm install\n\nSince launch is built on top of jake, you will need that too. It's best\nto install jake globally, so that the binary is in your path, so:\n\n    npm install jake -g\n\nThe last thing to do is create a `Jakefile` in your project root. For now,\njust put the following:\n\n```js\nvar share = {},\n  action = require('launch')(share).action;\n```\n\nTo test that launch and jake are installed correctly, do:\n  \n    jake -T\n\nThis should output a list the of namespaced launch tasks.\n\n## Usage\n\n**You should be familiar with jake**\n\nThe default set of tasks require a little bit of project metadata. In your\n`package.json`, put the following info:\n\n```js\n\"launchconf\" : {\n  \"remote\" : \"host-name\",\n  \"remotepath\" : \"/path/to/apps\"\n}\n```\n\nRun `jake launch:info` to make sure you've got this right.\n\nNow you're ready to create some of your own tasks for deployment. Here is an\nexample `Jakefile` that I currently use:\n\n```js\nvar share = {}, // Shared info between the\n                // Jakefile tasks and the launch tasks\n  action = require('launch')(share).action; // Get the launch actions,\n                                            // passing in the shared var\n\n\n/*\n * Run with `jake deploylive`. Depends on `setenvlive` and `restart`\n * which are defined in this file, and `launch:installdeps` which is\n * provided by launch. The task itself is empty, the important things\n * are its dependencies being called in order.\n */\ndesc('Deploy the current branch to the live environment');\ntask('deploylive', ['setenvlive', 'launch:symlink', 'restart'], function () {\n});\n\n/*\n * Sets the optional enviroment on the shared object\n * to `live`, which is used by a launch task when operating\n * with the remote filesystem. This task depends on the\n * launch task `launch:info` to gather the remote info.\n */\ndesc('Sets the environment to live');\ntask('setenvlive', ['launch:info'], function () {\n  share.env = 'live';\n});\n\n\n/*\n * A custom task of mine to restart the the site/app\n * (I use upstart). This shows how to execute an arbitrary\n * remote command with launch's `action`s.\n */\ndesc('Restarts the server given an `env`');\ntask('restart', function () {\n\n  if (!share.env) {\n    action.error('`env` is not set.');\n    fail();\n  }\n\n  action.remote(share.info.remote,\n    'sudo stop site.' + share.info.name + '-' + share.env + ' && '\n    + 'sudo start site.' + share.info.name + '-' + share.env, function (exitcode) {\n      if (exitcode === 0) {\n        action.notice('The site service restarted.');\n        action.notice('Check manually to verify that the site is running.')\n      } else {\n        action.error('Failed to restart site');\n        fail();\n      }\n    });\n\n}, true);\n```\n\nThat's it! Enjoy. Oh and here's the obligatory screenshot:\n\n![launch running](http://f.cl.ly/items/3K020K3K2C1v333e1q2S/Screen%20Shot%202011-12-09%20at%2023.34.58.png)\n\n\n## License\n\n(The MIT License)\n\nCopyright (c) 2011 Ben Gourley &lt;benleighgourley@gmail.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.\n","maintainers":[{"email":"hello@jonlovera.com","name":"jonlovera"}],"time":{"modified":"2022-06-19T10:49:50.183Z","created":"2011-12-14T01:56:20.114Z","0.0.1":"2011-12-14T01:56:21.422Z"},"author":{"name":"Ben Gourley"}}