Skip to content

Latest commit

 

History

History
29 lines (23 loc) · 1.24 KB

README.md

File metadata and controls

29 lines (23 loc) · 1.24 KB

swarmerode

Build Status Test Coverage Dependency Status devDependency Status js-standard-style

Swarmerode is a tool to extend dockerode with nice swarm helper functions.

Example

var Swarmerode = require('swarmerode')
var Dockerode = require('dockerode')

// extend Dockerode w/ Swarm functions.
Dockerode = Swarmerode(Dockerode)

var swarmClient = new Dockerode(/* opts */)
swarmClient.swarmHostExists('10.0.0.1:2375', function (err, hostExists) {
  if (err) { throw err }
  console.log(
    hostExists
      ? 'The given host exists!'
      : 'The given host was not found.'
  )
})