2.0.0 • Published 2 years ago

@stricjs/cluster v2.0.0

Weekly downloads
-
License
-
Repository
github
Last release
2 years ago

@stricjs/cluster

A cluster implementation for Bun.

Install

bun i @stricjs/cluster

Usage

import { worker, spawn } from '@stricjs/cluster';

// If current module is a worker
if (worker) Bun.serve({
    fetch: () => new Response('Hi'),
    // Must use this
    reusePort: true
});

// Spawn a number of threads equivalent to available hardware concurrency
else spawn();
2.0.0

2 years ago

1.0.6

2 years ago

1.0.5

2 years ago

1.0.4

2 years ago

1.0.2

2 years ago

1.0.1

2 years ago

1.0.1-alpha

2 years ago

1.0.0

2 years ago