Complete cgminer API implementation for Node.js with multi-version support, response validation, and integration tests.
$ npm install cgminer-api --save
var Client = require('cgminer-api').client;
var cgminer = new Client({
host: '192.168.1.99',
port: 4028
});
cgminer.connect()
.then(function () {
return cgminer.version();
})
.then(function (version) {
console.log(version);
})
.catch(function (error) {
console.log(error);
});
MIT