{"__v":5,"_id":"54d03f57f530ca0d00053980","category":{"__v":2,"_id":"54cfba345ff7e617002bbd87","project":"54cf411f9d09bb0d00a17a1c","version":"54cf411f9d09bb0d00a17a1f","pages":["54d03f0e94f7980d0081b86f","54d03f57f530ca0d00053980"],"reference":false,"createdAt":"2015-02-02T17:56:04.441Z","from_sync":false,"order":6,"slug":"deploying-code","title":"Deploying Code"},"project":"54cf411f9d09bb0d00a17a1c","user":"54cfa8c8a8a4fd0d00b7fd1c","version":{"__v":13,"_id":"54cf411f9d09bb0d00a17a1f","project":"54cf411f9d09bb0d00a17a1c","createdAt":"2015-02-02T09:19:27.656Z","releaseDate":"2015-02-02T09:19:27.656Z","categories":["54cf41209d09bb0d00a17a20","54cfb99bbba1a023008741af","54cfb9a65ff7e617002bbd7f","54cfba03bba1a023008741b6","54cfba0ebba1a023008741b8","54cfba19bba1a023008741b9","54cfba29bba1a023008741bb","54cfba345ff7e617002bbd87","54cfba3ebba1a023008741bc","54cfba473995cf0d0006f6f0","54e371b18ef7552300409bf2","54e37aa5e887c50d005ef629","555a4e9b147f91190092d137"],"is_hidden":false,"is_beta":false,"is_stable":true,"codename":"","version_clean":"1.0.0","version":"1.0"},"updates":["554d332fde67270d009b0485"],"createdAt":"2015-02-03T03:24:07.922Z","link_external":false,"link_url":"","githubsync":"","sync_unique":"","hidden":false,"api":{"results":{"codes":[]},"auth":"required","params":[],"url":""},"order":1,"body":"You can manually install various command-line tools into your workspace and deploy using the command line.\nIt should go without saying that this is for developers that aren't afraid of the command line.\n\nBelow is a list of some of the services we have tested and support deploying to. \nAll the commands need to be executed in [the terminal](./terminal.html) unless stated otherwise.\n\n## Heroku\n\nHeroku's `toolbelt` is installed by default in new VMs.\n\nNow, you can use the `heroku` command for your projects, as described in the \n[Heroku documentation](https://toolbelt.heroku.com/).\n\nIf deploying to Heroku, you should probably be using a local instance of PostgresQL, or you may run into problems caused by different database interpretations of SQL.\n\n## Windows Azure Web Sites\n\nIn [the Console](./console.html) or [a Terminal](./terminal.html), type the \nfollowing:\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"npm install azure\",\n      \"language\": \"text\"\n    }\n  ]\n}\n[/block]\nNow, you can use the `azure` command from the Console/Terminal. For more \ninformation, read [the official `azure` documentation](https://github.com/WindowsAzure/azure-sdk-for-node).\n\n## Windows Azure Cloud Services\n\nFor free and premium plans, follow the instructions on the \n[azure-cmdlet-node](https://github.com/c9/azure-cmdlet-node) repository. This \nproject is maintained by Cloud9.\n\n## Google App Engine\nFirst, setup Push to Deploy: Create a new App Engine application at \n[cloud.google.com/console](http://cloud.google.com/console), and then enable \nPush-to-Deploy under 'App Engine' in the Application Settings page. Leave this \ntab open to note the URL for your repo.\n\nSecondly, configure Cloud9. Run the following commands (making sure to replace \nyour email address, auth-token, and repo-url):\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"echo \\\"machine code.google.com login EMAIL password PASSWORD\\\" >> ~/.netrc\\ngit remote add appengine REPO\",\n      \"language\": \"text\"\n    }\n  ]\n}\n[/block]\n\n[block:callout]\n{\n  \"type\": \"success\",\n  \"body\": \"Note: The email in this case is the mail address you use to login to your Google\\nApp Engine account and the password is the auth-token generated from the admin\\nconsole, it is not your google password, never type that into a third party tool.\\n'REPO' is the repository URL generated before.\"\n}\n[/block]\nFinally, do a `commit`, and a `push`:\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"git commit -a -m \\\"First commit\\\"\\ngit push appengine master\",\n      \"language\": \"text\"\n    }\n  ]\n}\n[/block]\n## OpenShift\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"# Install rhc:\\ngem install rhc\\nrhc setup\\n\\n# After this you can use rhc to manage your account:\\n\\n# list apps:\\nrhc apps\\n# To show what you can do with apps do:\\nrhc app help\\n# You deploy via a git push\\ngit push <giturl> master\",\n      \"language\": \"text\"\n    }\n  ]\n}\n[/block]\n## CloudFoundry\n\nTo deploy to CloudFoundry from the command line in [the Console](./console.html) \nor [a Terminal](./terminal.html), you need to install the command line tools:\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"cd ~\\nwget -O cf.tgz 'https://cli.run.pivotal.io/stable?release=linux64-binary&source=github'\\ntar xvzf cf.tgz\",\n      \"language\": \"text\"\n    }\n  ]\n}\n[/block]\nYou can now run `cf` from the Console and the Terminal. For more information, see \n[the official `CloudFoundry` documentation](https://github.com/cloudfoundry/cli).\n\n\n## NodeJitsu\n\n### Free and Premium Plans\n\nIn the [the Console](./console.html) or [a Terminal](./terminal.html), type:\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"npm install jitsu@0.7.x -g\\nmkdir node_modules\\nmv ../lib/node_modules/jitsu node_modules\",\n      \"language\": \"text\"\n    }\n  ]\n}\n[/block]\nNow, you can run `jitsu` from the command line. For more information, see \n[the official `jitsu` documentation](https://github.com/nodejitsu/jitsu).\n\n### Premium Plans\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"npm install jitsu@0.7.x -g\",\n      \"language\": \"text\"\n    }\n  ]\n}\n[/block]\nYou can now run `jitsu` from both the Console and the Terminal.\n\n## Modulus\n\nIn the [the Console](./console.html) or [a Terminal](./terminal.html), type:\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"npm install modulus -g\",\n      \"language\": \"text\"\n    }\n  ]\n}\n[/block]\nNow, you can run `modulus` from the command line. For more information, see \n[the official `modulus` documentation](https://github.com/onmodulus/modulus-cli).\n\n## Divshot\n\nIn the [the Console](./console.html) or [a Terminal](./terminal.html), type:\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"npm install -g divshot-cli\",\n      \"language\": \"text\"\n    }\n  ]\n}\n[/block]\nNow, you can run `divshot` from the command line. For more information, see \n[the official `divshot` documentation] (http://docs.divshot.com/guides/getting-started).","excerpt":"","slug":"deploying-via-cli","type":"basic","title":"Deploying via the Command Line"}

Deploying via the Command Line


You can manually install various command-line tools into your workspace and deploy using the command line. It should go without saying that this is for developers that aren't afraid of the command line. Below is a list of some of the services we have tested and support deploying to. All the commands need to be executed in [the terminal](./terminal.html) unless stated otherwise. ## Heroku Heroku's `toolbelt` is installed by default in new VMs. Now, you can use the `heroku` command for your projects, as described in the [Heroku documentation](https://toolbelt.heroku.com/). If deploying to Heroku, you should probably be using a local instance of PostgresQL, or you may run into problems caused by different database interpretations of SQL. ## Windows Azure Web Sites In [the Console](./console.html) or [a Terminal](./terminal.html), type the following: [block:code] { "codes": [ { "code": "npm install azure", "language": "text" } ] } [/block] Now, you can use the `azure` command from the Console/Terminal. For more information, read [the official `azure` documentation](https://github.com/WindowsAzure/azure-sdk-for-node). ## Windows Azure Cloud Services For free and premium plans, follow the instructions on the [azure-cmdlet-node](https://github.com/c9/azure-cmdlet-node) repository. This project is maintained by Cloud9. ## Google App Engine First, setup Push to Deploy: Create a new App Engine application at [cloud.google.com/console](http://cloud.google.com/console), and then enable Push-to-Deploy under 'App Engine' in the Application Settings page. Leave this tab open to note the URL for your repo. Secondly, configure Cloud9. Run the following commands (making sure to replace your email address, auth-token, and repo-url): [block:code] { "codes": [ { "code": "echo \"machine code.google.com login EMAIL password PASSWORD\" >> ~/.netrc\ngit remote add appengine REPO", "language": "text" } ] } [/block] [block:callout] { "type": "success", "body": "Note: The email in this case is the mail address you use to login to your Google\nApp Engine account and the password is the auth-token generated from the admin\nconsole, it is not your google password, never type that into a third party tool.\n'REPO' is the repository URL generated before." } [/block] Finally, do a `commit`, and a `push`: [block:code] { "codes": [ { "code": "git commit -a -m \"First commit\"\ngit push appengine master", "language": "text" } ] } [/block] ## OpenShift [block:code] { "codes": [ { "code": "# Install rhc:\ngem install rhc\nrhc setup\n\n# After this you can use rhc to manage your account:\n\n# list apps:\nrhc apps\n# To show what you can do with apps do:\nrhc app help\n# You deploy via a git push\ngit push <giturl> master", "language": "text" } ] } [/block] ## CloudFoundry To deploy to CloudFoundry from the command line in [the Console](./console.html) or [a Terminal](./terminal.html), you need to install the command line tools: [block:code] { "codes": [ { "code": "cd ~\nwget -O cf.tgz 'https://cli.run.pivotal.io/stable?release=linux64-binary&source=github'\ntar xvzf cf.tgz", "language": "text" } ] } [/block] You can now run `cf` from the Console and the Terminal. For more information, see [the official `CloudFoundry` documentation](https://github.com/cloudfoundry/cli). ## NodeJitsu ### Free and Premium Plans In the [the Console](./console.html) or [a Terminal](./terminal.html), type: [block:code] { "codes": [ { "code": "npm install jitsu@0.7.x -g\nmkdir node_modules\nmv ../lib/node_modules/jitsu node_modules", "language": "text" } ] } [/block] Now, you can run `jitsu` from the command line. For more information, see [the official `jitsu` documentation](https://github.com/nodejitsu/jitsu). ### Premium Plans [block:code] { "codes": [ { "code": "npm install jitsu@0.7.x -g", "language": "text" } ] } [/block] You can now run `jitsu` from both the Console and the Terminal. ## Modulus In the [the Console](./console.html) or [a Terminal](./terminal.html), type: [block:code] { "codes": [ { "code": "npm install modulus -g", "language": "text" } ] } [/block] Now, you can run `modulus` from the command line. For more information, see [the official `modulus` documentation](https://github.com/onmodulus/modulus-cli). ## Divshot In the [the Console](./console.html) or [a Terminal](./terminal.html), type: [block:code] { "codes": [ { "code": "npm install -g divshot-cli", "language": "text" } ] } [/block] Now, you can run `divshot` from the command line. For more information, see [the official `divshot` documentation] (http://docs.divshot.com/guides/getting-started).