Simple NodeJS script to store TLS certificates and keys to a Consul KV and restore to disk if modified since last check
$ node index.js operation consulUrl FQDN crtPath keyPath
Note: the Consul URL must be valid and working
node index.js 'set' 'http://localhost:8500' 'homolog.zimp.me' './test/cert/localhost.crt' './test/cert/localhost.key'
node index.js 'get' 'http://localhost:8500' 'homolog.zimp.me' './test/cert/localhost.crt' './test/cert/localhost.key'
See MIT.