Hello
I'm having trouble connecting to multichain-node for RPC request. Terminal requests work just fine :
multichain-cli PecheMLC -rpcport=4790 -rpcuser=multichainrpc -rpcpassword=3ZnqXHcc3LZ9Q9CZo3xpGB4ppNg8nvS4HtifT7oZfsyK // get me all access
Yet, from node file embeded in firebase function file, I keep having :
{ Error: connect ECONNREFUSED 127.0.0.1:4790
at Object.exports._errnoException (util.js:1018:11)
at exports._exceptionWithHostPort (util.js:1041:20)
at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1086:14)
code: 'ECONNREFUSED',
errno: 'ECONNREFUSED',
syscall: 'connect',
address: '127.0.0.1',
port: 4790 }
here is my code :
//
exports.initMultiChain = functions.https.onRequest((req,res) => {
let multichain = require("multichain-node")({
port: 4790, // got this from params.dat
host: '127.0.0.1', // local
user: 'multichainrpc',
pass: '3ZnqXHcc3LZ9Q9CZo3xpGB4ppNg8nvS4HtifT7oZfsyK'
});
multichain.getInfo(function(e, info){
if(e){ console.log(e);}
res.send(info)
res.end("done")
});
})
and multichain.conf :
rpcuser=multichainrpc
rpcpassword=3ZnqXHcc3LZ9Q9CZo3xpGB4ppNg8nvS4HtifT7oZfsyK
Many thanks in advance if you have clue on this :)