Node.js based RNode REPL interface.
npm install @rchain-community/replNode.js based RNode REPL interface.
This package enabled applications to use the interal gRPC interface of the
RChain RNode server to execute Eval and Run commands.
Install using NPM:
``shell`
npm i @rchain-community/repl
Usage:
`js
const REPL = require('@rchain-community/repl')
const repl = new REPL(host, port)
repl.eval(myRholangCode)
.then(output => {
console.log(output)
})
.catch(err => {
console.log(err)
})
`
You can also use this package as a CLI script to execute Rholang programs.
In order to do so, first install it globally:
`shell`
npm i -g @rchain-community/repl
Usage:
`shell``
rnode-repl