Connect to sgminer API and return a summary using node-xgminer - https://www.npmjs.org/package/xgminer
var xgminer = require('../lib/xgminer');
var MinerAPI = new xgminer('Miner 1', '192.168.0.111', 4028);
MinerAPI.send('summary', '').then(function (res) {
console.log(res);
}, function (err) {
console.log(err);
});