Permalink
Browse files

Merge branch 'master' of github.com:mde/geddy

Conflicts:
	lib/init/build.js
  • Loading branch information...
2 parents 5c74f03 + 85d1a2f commit c57babe9ddb6735ce9ac18aef0ead7a6d7a823a1 mde committed Nov 9, 2012
Showing with 58 additions and 9 deletions.
  1. +58 −9 docs/8-deployment.md
View
@@ -1,21 +1,70 @@
-We use the following example as a reference. There will be some diferences with other environments.
+We use the following example as a reference. There will be some differences with other environments.
+
+#### Nodejitsu
+
+##### Pre-requisites
+1. Install the [jitsu](https://npmjs.org/package/jitsu) module
+2. Install Geddy. If you're new, you can start with the [tutorial](http://geddyjs.org/tutorial)
+3. Create a Nodejitsu account(Not required: we'll go over creating one from the CLI)
+4. Have an app ready to be deployed
+
+If you haven't already you'll need to sign up and log in to Nodejitsu which you can do from the jitsu executable.
+```
+jitsu signup
+jitsu login
+```
+
+Now once you've created an account on Nodejitsu we need to prepare the application you have for deployment. First we'll edit(or create) a `package.json` file in the app's root directory
+```
+{
+ "name": "node-example",
+ "version": "0.0.1",
+ "dependencies": {
+ "geddy": "0.6.x"
+ },
+ "subdomain": "geddy-example",
+ "scripts": {
+ "start": "app.js"
+ },
+ "engines": {
+ "node": "0.8.x"
+ }
+}
+```
+Here we have a subdomain key/value this tells Nodejitsu what subdomain to host the application on(e,g,. geddy-example.jit.su). We also have a start script pointing to `app.js` in the root directory, we'll go over what to put here in a second. Of course you should edit this to include anything else you want, like other dependences or an author.
+
+Now we need to create a `app.js` file so that Nodejitsu can use it to boot the Geddy server, here's what it should look like
+```
+var geddy = require('geddy');
+
+geddy.start({
+ environment: 'production'
+});
+```
+In the object we're giving to `geddy.start` you can use any other arguments you'd for the configuration files, these will override the ones loaded for the environment. For more information about this file you can go [here](https://github.com/mde/geddy/wiki/Using-Geddy-without-the-CLI)
+
+Now that our application is set up for deployment, we need to deploy it which is just a single command
+```
+jitsu deploy
+```
+Now you can go to http://geddy-example.jit.su and see your application!
#### Heroku
##### Pre-requisites
1. Install [heroku toolbelt](https://devcenter.heroku.com/articles/quickstart#step-2-install-the-heroku-toolbelt)
-2. Install geddy. If you're new, you can start with the [tutorial](http://geddyjs.org/tutorial)
+2. Install Geddy. If you're new, you can start with the [tutorial](http://geddyjs.org/tutorial)
3. Be familiar with GIT, the basic geddy commands, and heroku's deployment models
-4. Have an app ready to be deployed.
+4. Have an app ready to be deployed.
-Add a `package.json` file to your app's root folder
+Add a `package.json` file to your app's root directory
```javascript
{
"name": "node-example",
"version": "0.0.1",
"dependencies": {
- "geddy": "0.5.x"
+ "geddy": "0.6.x"
},
"engines": {
"node": "0.8.x",
@@ -33,7 +82,7 @@ var config = {
```
-Add a `Procfile` text file to your app's root folder
+Add a `Procfile` text file to your app's root directory
```
//web: node node_modules/geddy/bin/cli.js
@@ -44,16 +93,16 @@ geddy.startCluster({
});
```
-Now it's time to create a heroku app.
+Now it's time to create a heroku app.
```
$ heroku create --stack cedar
```
-Add everything to git and push to heroku
+Add everything to git and push to heroku
```
$ git push heroku master
```
-For more information about deploying and supporting Node Apps on Heroku see the [Getting Started with Node.js on Heroku](https://devcenter.heroku.com/articles/nodejs) article.
+For more information about deploying and supporting Node Apps on Heroku see the [Getting Started with Node.js on Heroku](https://devcenter.heroku.com/articles/nodejs) article.

0 comments on commit c57babe

Please sign in to comment.