Skip to content
This repository
Browse code

[doc] add jitsu hooks documentation

  • Loading branch information...
commit f2d3ac345f12694fb68f27c5a75d4b81530a5c50 1 parent f4e59df
Christian Howe authored September 27, 2012

Showing 1 changed file with 38 additions and 0 deletions. Show diff stats Hide diff stats

  1. 38  README.md
38  README.md
Source Rendered
@@ -138,6 +138,44 @@ If you need to authenticate yourselves to the proxy, you can try this command.
138 138
     jitsu config set proxy http://user:pass@proxy.domain.com:3128/
139 139
 
140 140
 <a name="Libraries"></a>
  141
+
  142
+##jitsu hooks
  143
+
  144
+You can add pre-deploy and post-deploy hooks to jitsu for running build scripts, tagging releases or anything else you want to do. These are hooks that are executed before or after deploying your application on the local machine. They are stored in your package.json:
  145
+
  146
+    {
  147
+      "name": "test-app",
  148
+      "subdomain": "test-app",
  149
+      "scripts": {
  150
+        "predeploy": "echo This will be run before deploying the app",
  151
+        "postdeploy": "echo This will be run after deploying the app",
  152
+        "start": "app.js"
  153
+      },
  154
+      "engines": {
  155
+        "node": "0.6.x"
  156
+      },
  157
+      "version": "0.0.0"
  158
+    }
  159
+
  160
+Which results in the following output when deploying:
  161
+
  162
+    $ jitsu deploy
  163
+    info:    Welcome to Nodejitsu nodejitsu
  164
+    info:    It worked if it ends with Nodejitsu ok
  165
+    info:    Executing command deploy
  166
+    info:    Analyzing your application dependencies in app.js
  167
+    info:    Checking app availability test-app
  168
+    info:    Creating app test-app
  169
+    This will be run before deploying the app
  170
+    info:    Creating snapshot 0.0.0
  171
+    info:    Updating app test-app
  172
+    info:    Activating snapshot 0.0.0 for test-app
  173
+    info:    Starting app test-app
  174
+    info:    App test-app is now started
  175
+    info:    http://test-app.jit.su on Port 80
  176
+    This will be run after deploying the app
  177
+    info:    Nodejitsu ok
  178
+
141 179
 ## Libraries
142 180
 `jitsu` is built on a few well developed, well maintained Node.js libraries. The [Nodejitsu](http://nodejitsu.com) team and friends have been building and using these projects actively for the past two years. They are the most used Node libraries (see: [http://search.npmjs.org/](http://search.npmjs.org/)) and are actively maintained by Nodejitsu and other core members of the Node.js community. Each library serves a specific function and we highly suggest you check each one out individually if you wish to increase your knowledge of Node.js
143 181
 

0 notes on commit f2d3ac3

Please sign in to comment.
Something went wrong with that request. Please try again.