1.0.2 • Published 12 years ago

dispatch-spawn v1.0.2

Weekly downloads
1
License
-
Repository
-
Last release
12 years ago

Dispatch Spawn

Execute fleet-spawn in a given git repo

Build Status

Installation

npm install -S dispatch-spawn

Usage

To spawn a command, pass all the required parameters to the dispatch-spawn module

var inspect = require('eyespect').inspector();
var dispatchSpawn = require('dispatch-spawn')
var repoDir = '/path/to/checked/out/repo'
var command = 'node startServer.js'  // command to spawn
var host = 'localhost' // fleet hub host
var port = 4002 // fleet hub port
var secret = 'foo_secret' // fleet hub secret

var data = {
  repoDir: repoDir,
  host: host,
  port: port,
  secret: secret,
  command: command
}
dispatchSpawn(data, function (err) {
  if (err) {
    console.log(err.stack)
    delete err.stack
    inspect(err, 'error spawning command')
    return
  }
  inspect('command spawned correctly')
})

Test

1.0.2

12 years ago

1.0.1

12 years ago