rqlited-spawn
v1.0.4
Published
A wrapper around rqlited for spawning rqlite nodes
Downloads
3
Readme
rqlited-spawn
Installation
npm i rqlited-spawn
Usage
const startRqliteNode = require('rqlited-spawn');
async function main() {
// start two nodes
const node1 = await startRqliteNode({
data: 'data',
api: 4001,
raft: 4002,
timeout: 10000
});
const node2 = await startRqliteNode({
data: 'data2',
api: 4003,
raft: 4004,
timeout: 10000,
leader: 'localhost:4002'
});
// stop them
node1.kill();
node2.kill();
}
License
MIT