{"_id":"@alb-xh/load-balancer","name":"@alb-xh/load-balancer","dist-tags":{"latest":"1.0.0"},"versions":{"1.0.0":{"name":"@alb-xh/load-balancer","version":"1.0.0","description":"Load balancer server","main":"dist/index.js","type":"module","scripts":{"build":"rm -rf ./build && tsc","start":"node ./build/index.js","dev":"tsx ./src/index.ts","simulate":"tsx ./simulator/index.ts"},"engines":{"node":">=20.0.0"},"keywords":["load-balancer"],"repository":{"url":"git+https://github.com/alb-xh/load-balancer.git"},"author":{"name":"alb-xh"},"license":"ISC","devDependencies":{"typescript":"^5.6.3"},"dependencies":{"@types/node":"^22.7.7","tsx":"^4.19.1"},"_id":"@alb-xh/load-balancer@1.0.0","gitHead":"dce9d2405d114102828c9a90be0b9ee756cbbad3","types":"./dist/index.d.ts","bugs":{"url":"https://github.com/alb-xh/load-balancer/issues"},"homepage":"https://github.com/alb-xh/load-balancer#readme","_nodeVersion":"20.16.0","_npmVersion":"10.8.1","dist":{"integrity":"sha512-ypcBfMpJ98J+Qshu0ivPEffFT4JjWomurh5gUv4ZmIdL9GdObpvvr/6nFn6s5sEi8bxv8/PVw9UOz5NdAiSCRQ==","shasum":"3ace0cdb7efffb386cb4acda38561eef3dd1187d","tarball":"https://registry.npmjs.org/@alb-xh/load-balancer/-/load-balancer-1.0.0.tgz","fileCount":10,"unpackedSize":3087,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIET5K5VI7LeoyYgTB78nJgTj0/pC9Vez7gsNuqZZvE6fAiAg8cmLyFcK7JlT4JQZfHrjzPsqL7FLC5R82iy2MhivkQ=="}]},"_npmUser":{"name":"alb-xh","email":"albano.xhafaj10@gmail.com"},"directories":{},"maintainers":[{"name":"alb-xh","email":"albano.xhafaj10@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/load-balancer_1.0.0_1729687247074_0.637172738744749"},"_hasShrinkwrap":false}},"time":{"created":"2024-10-23T12:40:46.983Z","1.0.0":"2024-10-23T12:40:47.255Z","modified":"2024-10-23T12:40:47.543Z"},"maintainers":[{"name":"alb-xh","email":"albano.xhafaj10@gmail.com"}],"description":"Load balancer server","homepage":"https://github.com/alb-xh/load-balancer#readme","keywords":["load-balancer"],"repository":{"url":"git+https://github.com/alb-xh/load-balancer.git"},"author":{"name":"alb-xh"},"bugs":{"url":"https://github.com/alb-xh/load-balancer/issues"},"license":"ISC","readme":"# @alb-xh/load-balancer\n\n## Development\n\n1. `nvm use`\n2. `npm i`\n3. `npm run simulate`\n\n## Usage\n\n1. `npm i @alb-xh/load-balancer` (node >= 20)\n2. Example\n```ts\nimport { LoadBalancer } from '@alb-xh/load-balancer';\n\nconst lb = new LoadBalancer({\n  serverUrls: [\n    new URL('http://localhost:4000'),\n    new URL('http://localhost:4001'),\n    new URL('http://localhost:4002'),\n  ],\n  algo: 'round-robin',\n});\n\nlb.listen(5000, () => {\n  console.log('Listening');\n});\n```\n","readmeFilename":"README.md"}