@paqujs/sharding
TypeScript icon, indicating that this package has built-in type declarations

1.1.3 • Public • Published

@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!`);
});

Links

Package Sidebar

Install

npm i @paqujs/sharding

Weekly Downloads

3

Version

1.1.3

License

Apache-2.0

Unpacked Size

30.4 kB

Total Files

9

Last publish

Collaborators

  • hanzydev