Clone this wiki locally
1. Install pod
$ npm install -g pod
2. Run pod for the first time
You will be prompted to choose a place for pod to settle down. If the target directory does not exist, you can let pod create it for you:
3. Create your first app
The following happens on your local dev machine.
- Make sure your app's main file is
app.js. If it's using a different name, you can either edit the config file on the server (
~/.podrc) or specify it in the app's
package.json's "main" field.
- The path to the bare repo was listed in the output of last step.
- I've setup my VPS to be aliased "do" in my
~/.ssh/confighere, you can either do that or use raw username@ip format.
$ git remote add deploy ssh://do/srv/stuff/repos/myapp.git
... skipping all the
npm install remote messages...
Tada! The app is running!
You might notice there's a "fatal: bad default revision HEAD" error, but that's fine because the post-receive hook tries to determine the last commit of the remote repo in case things go wrong so pod can revert the working copy to it. Since this is the first push, the repo is still empty, hence that error. Just ignore it.
5. Check status on server
That's it! You may also want to find out how to setup an app using a GitHub repo.