Updates
This commit is contained in:
@@ -2,7 +2,8 @@ require('bare-process/global')
|
||||
const { HyperP2PRaftLite } = require('../index.js')
|
||||
|
||||
async function main () {
|
||||
const raft = new HyperP2PRaftLite({ peerId: 'n1' })
|
||||
const raft = new HyperP2PRaftLite({ topic: process.argv[2] || null, peerId: 'n1' })
|
||||
await raft.ready()
|
||||
raft.appendLog({ cmd: 'ping' })
|
||||
raft.becomeLeader(1)
|
||||
console.log(raft.role(), raft.getStats())
|
||||
|
||||
Reference in New Issue
Block a user