https://github.com/anders94/raftjs
https://github.com/anders94/raftjs
Last synced: 9 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/anders94/raftjs
- Owner: anders94
- License: mit
- Created: 2023-05-21T01:17:41.000Z (about 3 years ago)
- Default Branch: main
- Last Pushed: 2023-05-23T03:38:48.000Z (about 3 years ago)
- Last Synced: 2025-09-14T12:44:24.128Z (9 months ago)
- Language: JavaScript
- Size: 14.6 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# raftjs
A Node.js implementation of the RAFT protocol using UDP.
(very early - not yet functional - work is in progress)
## Usage
Either use the included `test.js` or do something like this:
```js
const RaftNode = require('./lib');
const rn = new RaftNode('127.0.0.1', 3000);
rn.addPeer('127.0.0.1', 3001);
rn.addPeer('127.0.0.1', 3002);
rn.start();
```
## Notes
Right now all we do is elect a leader. More later.
Eventually I'm going to make this a module.