grunt-ot-discovery

grunt tasks for opentable flavoured service discovery

Usage no npm install needed!

<script type="module">
  import gruntOtDiscovery from 'https://cdn.skypack.dev/grunt-ot-discovery';
</script>

README

grunt-ot-discovery

Build Status NPM version Dependencies

Hook for ot-flavoured service-discovery.

Assumes the server is running hapi-service-discovery module (using ot-service-discovery) and has endpoints discovery/announce and discovery/unannounce available.

installation:

npm install --save grunt-ot-discovery

usage:

grunt.initConfig({
  'ot-discovery':{
    'announce': {
      options: {
        server: 'my.server.domain',
        action: 'announce'
      }
    },
    'unannounce': {
      options: {
        server: 'my.server.domain'
        action: 'unannounce',
        ignoreErrors: true
      }
    }
  }
});

options:

`server`: server to hit
`action`: announce | unannounce (default announce)
`ignoreErrors`: true | false (default false)