{"id":17156319,"url":"https://github.com/nxht/bun-cluster-reload","last_synced_at":"2026-02-24T02:31:32.300Z","repository":{"id":226853123,"uuid":"769805659","full_name":"nxht/bun-cluster-reload","owner":"nxht","description":"PM2-like cluster with reload for bun","archived":false,"fork":false,"pushed_at":"2024-06-06T07:34:39.000Z","size":49,"stargazers_count":1,"open_issues_count":1,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-10-31T03:43:27.674Z","etag":null,"topics":["bun"],"latest_commit_sha":null,"homepage":"https://www.npmjs.com/package/bun-cluster-reload","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/nxht.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-03-10T05:23:42.000Z","updated_at":"2025-04-29T08:14:40.000Z","dependencies_parsed_at":null,"dependency_job_id":"42b7ec39-9eaa-43ba-aa8c-72580618e61c","html_url":"https://github.com/nxht/bun-cluster-reload","commit_stats":{"total_commits":32,"total_committers":1,"mean_commits":32.0,"dds":0.0,"last_synced_commit":"e2cba2415ac4ea2e0f7534af8ba838ef51600393"},"previous_names":["nxht/bun-cluster-reload"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/nxht/bun-cluster-reload","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nxht%2Fbun-cluster-reload","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nxht%2Fbun-cluster-reload/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nxht%2Fbun-cluster-reload/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nxht%2Fbun-cluster-reload/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/nxht","download_url":"https://codeload.github.com/nxht/bun-cluster-reload/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nxht%2Fbun-cluster-reload/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29769176,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-24T01:40:24.820Z","status":"online","status_checked_at":"2026-02-24T02:00:07.497Z","response_time":75,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["bun"],"created_at":"2024-10-14T22:06:08.791Z","updated_at":"2026-02-24T02:31:32.277Z","avatar_url":"https://github.com/nxht.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# bun-cluster-reload\n\npm2-like cluster with reload for bun\n\n## Installation\n\n```bash\nbun add bun-cluster-reload\n```\n\n## Features\n\n- Auto-restart on error\n- [PM2-like reload](https://pm2.keymetrics.io/docs/usage/cluster-mode/#reload) on signal\n- [PM2-like waitReady](https://pm2.keymetrics.io/docs/usage/signals-clean-restart/#graceful-start) option\n\n## Example\n\n```typescript\nimport { ClusterRunner } from 'bun-cluster-reload';\n\nconst clusterRunner = new ClusterRunner({\n  numCPUs: 2,\n  logger: console,\n  autorestart: true,\n  waitReady: true,\n});\n\nawait clusterRunner.start({\n  command: ['bun', 'src/index.ts'],\n  reloadSignal: 'SIGHUP',\n  updateEnv: false,\n});\n```\n\n### Using with PM2\n\n- Set `bun` as pm2 interpreter as in [official Bun guide](https://bun.sh/guides/ecosystem/pm2)\n- The target script should be the ClusterRunner file\n  - Note that the clustering happens in `bun` not `pm2`. So you'll see a single process in pm2 monitoring\n- To reload, send predefined signal to process using `pm2 send signal`. For example:\n  ```bash\n  pm2 sendSignal SIGHUP app\n  ```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnxht%2Fbun-cluster-reload","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnxht%2Fbun-cluster-reload","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnxht%2Fbun-cluster-reload/lists"}