node.js deployment via ssh
JavaScript
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
test
.gitignore
README.md
index.js
package.json

README.md

rodent

npm package to deploy node.js apps.

Usage

  1. Install globally with npm:
sudo npm install -g rodent
  1. Make sure these properties exist in your package.json:
{
  "name": "your-app-name",
  "repository": {
    "url": "git@github.com:you/repo.git",
    "type": "git"
  },
  "scripts": {
    "rodent-start": "naught start server.js",
    "rodent-stop": "naught stop",
    "rodent-deploy": "naught deploy",
    "rodent-deploy-abort": "naught deploy-abort"
  },
  "rodent": {
    "flowdock": {
      "token": "38eb39023d382adff2eff209effb398f"
    },
    "commands": {
      "monitor": "tail -f *.log"
    },
    "targets": {
      "staging": {
        "ssh": {
          "user": "deploy",
          "port": 22,
          "hosts": [
            "..."
          ]
        },
        "env": {
          "HOST": "0.0.0.0",
          "PORT": 80,
          "NODE_ENV": "staging"
        }
      },
      "production": {
        "ssh": {
          "user": "deploy",
          "port": 22,
          "hosts": [
            "..."
          ]
        },
        "env": {
          "HOST": "0.0.0.0",
          "PORT": 80,
          "NODE_ENV": "production"
        }
      }
    }
  }
}
  1. Install and configure the prerequisites on your targets:
  1. Use the CLI to deploy your code like a boss:
Usage: rodent [command]

Available commands:

    list    list available deploy targets
    init    <target> - prepares target to accept deployments
    start   <target> - starts the remote server
    stop    <target> - stops the remote server
    diff    <target> [--branch branch] - display what will be deployed on target
    deploy  <target> [--branch branch] - deploy code
    abort   <target> - aborts a hanging deploy
    monitor <target> - tail logs on target
    exec    <target> - output environment variables for target