Newly Paranoid Maintainers
    Share your code. npm Orgs help your team discover, share, and reuse code. Create a free org »

    dispatch-spawnpublic

    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

    Keywords

    none

    install

    npm i dispatch-spawn

    Downloadsweekly downloads

    6

    version

    1.0.2

    license

    none

    last publish

    collaborators

    • avatar