Bläddra i källkod

05/25/2021 03:49:36 PM MST

master
coldstar 3 år sedan
förälder
incheckning
6af3fc8b9c
1 ändrade filer med 7 tillägg och 1 borttagningar
  1. +7
    -1
      routes/baseActionsRouter.js

+ 7
- 1
routes/baseActionsRouter.js Visa fil

@@ -315,12 +315,18 @@ router.get("/address/:address", function(req, res) {

res.locals.result = {};


const { exec } = require('child_process');
var yourscript = exec('/usr/local/bin/vivo-cli -conf=/etc/masternodes/vivo_n1.conf getaddressbalance \'{\"addresses\": [\"' + address + '"]}\'',
//var yourscript = exec('whoami',
(error, stdout, stderr) => {
console.log(stdout);

const json = stdout;
const obj = JSON.parse(json);

console.log(obj.balance);
console.log(obj.received);

console.log(stderr);
if (error !== null) {
console.log(`exec error: ${error}`);


Laddar…
Avbryt
Spara