watch-consul

0.1.0 • Public • Published

watch-consul

A simple utility for watching a JSON key on a consul server and triggering a callback initially and whenever a change occurs.

import watchConsul from 'watch-consul';
 
const watch = () =>
  watchConsul({url: 'my-consul-server:8500', key: '/my/key/to/watch'})
    .then(console.log.bind(console))
    .catch(console.error.bind(console))
    .then(watch);
 
watch();

Readme

Keywords

none

Package Sidebar

Install

npm i watch-consul

Weekly Downloads

5

Version

0.1.0

License

none

Last publish

Collaborators

  • caseywebdev