A simple Votifier implementation in TypeScript. Including standalone server and client of Votifier v2 protocol.
npm install votifier-x
import { VotifierServer } from 'votifier-x';
const server = new VotifierServer({
port: 8192, // optional, default is 8192
tokenPath: 'path/to/tokens.json', // optional, default is 'tokens.json'
});
server.start();
server.on('vote', (vote) => {
console.log(`Received vote from ${vote.username} at ${vote.address}`);
});
import { VotifierClient } from 'votifier-x';
const client = new VotifierClient({
host: '0.0.0.0',
port: 8192,
token: 'your-token',
serviceName: 'your-service-name',
});
await client.sendVote({
username: 'username',
address: 'address',
});
- NuVotifier
- Votifier(original)
- votifier2-js Votifier v2 implementation in JavaScript