@paqujs/sharding
v1.1.3
Published
Cluster manager for paqu.js
Downloads
27
Maintainers
Readme
@paqujs/sharding
Cluster manager for paqu.js.
Installation
Node.js 16.x or higher is required.
npm install @paqujs/sharding
yarn add @paqujs/sharding
pnpm add @paqujs/sharding
Usage
import { ClusterManager } from '@paqujs/sharding';
const manager = new ClusterManager({
file: 'index.js',
token: 'your-super-secret-token',
});
manager.spawn();
manager.on('clusterReady', (cluster) => {
console.log(`Cluster ${cluster.id} is ready!`);
});
manager.on('allReady', (clusters) => {
console.log(`All (${clusters.size}) clusters are ready!`);
});