Open Gerhut opened 6 years ago
Easy solution:
const bluebird = require('bluebird'); const Etcd = require('node-etcd'); bluebird.promisifyAll(Etcd.prototype); const etcd = new Etcd('http://127.0.0.1:2379'); async function foo() { let resp = await etcd.getAsync('/foo/bar/'); console.log('results are here:', resp.node.nodes); } foo();
Easy solution: