{"id":25531668,"url":"https://github.com/fent/socket.io-clusterhub","last_synced_at":"2025-04-11T11:05:48.200Z","repository":{"id":2472015,"uuid":"3444650","full_name":"fent/socket.io-clusterhub","owner":"fent","description":"socket.io storage powered by clusterhub for multi process applications.","archived":false,"fork":false,"pushed_at":"2018-05-17T04:43:46.000Z","size":11,"stargazers_count":68,"open_issues_count":0,"forks_count":3,"subscribers_count":9,"default_branch":"master","last_synced_at":"2025-01-17T04:12:50.208Z","etag":null,"topics":["cluster","node","socket-io"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/fent.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2012-02-14T22:30:44.000Z","updated_at":"2025-01-02T01:14:17.000Z","dependencies_parsed_at":"2022-09-13T21:12:51.171Z","dependency_job_id":null,"html_url":"https://github.com/fent/socket.io-clusterhub","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fent%2Fsocket.io-clusterhub","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fent%2Fsocket.io-clusterhub/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fent%2Fsocket.io-clusterhub/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fent%2Fsocket.io-clusterhub/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/fent","download_url":"https://codeload.github.com/fent/socket.io-clusterhub/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":239536532,"owners_count":19655240,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":["cluster","node","socket-io"],"created_at":"2025-02-20T01:19:27.159Z","updated_at":"2025-02-20T01:19:27.820Z","avatar_url":"https://github.com/fent.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# socket.io-clusterhub [![Build Status](https://secure.travis-ci.org/fent/socket.io-clusterhub.png)](http://travis-ci.org/fent/socket.io-clusterhub)\n\nA [socket.io](http://socket.io/) storage made with [clusterhub](https://github.com/fent/clusterhub). Syncs data between multi-process socket.io applications.\n\n**Note:** Only works with socket.io version \u003c= v0.9.0\n\n# Usage\n```js\nvar cluster = require('cluster');\nvar numCPUs = require('os').cpus().length;\n\n// store must be initialized for master/worker processes\nvar store = new (require('socket.io-clusterhub'));\n\nif (cluster.isMaster) {\n  for (var i = 0; i \u003c numCPUs; i++) {\n    cluster.fork();\n  }\n\n} else {\n  var io = require('socket.io').listen(3000)\n  console.log('Listening on port 3000');\n\n  // set the store to the socket.io-clusterhub instance\n  io.configure(function() {\n    io.set('store', store);\n  });\n\n  io.sockets.on('connection', function(socket) {\n    // use socket.io as normal\n  });\n}\n```\n\n# Install\n\n    npm install socket.io-clusterhub\n\n\n# Tests\nTests are written with [mocha](https://mochajs.org/)\n\n```bash\nnpm test\n```\n\n# License\nMIT\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffent%2Fsocket.io-clusterhub","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffent%2Fsocket.io-clusterhub","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffent%2Fsocket.io-clusterhub/lists"}