{"id":27969641,"url":"https://github.com/rupachowrasia/nodejs-event-emitter-for-pub-sub","last_synced_at":"2026-04-27T08:32:27.417Z","repository":{"id":291900351,"uuid":"978923636","full_name":"rupachowrasia/nodejs-event-emitter-for-pub-sub","owner":"rupachowrasia","description":"A sample app to demostrate how node.js event emitters work","archived":false,"fork":false,"pushed_at":"2025-05-07T04:55:30.000Z","size":12,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-05-07T21:49:48.744Z","etag":null,"topics":["emitter","eventsemitter","node-eventemitter","node-events","nodejs","pubsub","ticketing-system"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","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/rupachowrasia.png","metadata":{"files":{"readme":"README.md","changelog":null,"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,"zenodo":null}},"created_at":"2025-05-06T18:03:42.000Z","updated_at":"2025-05-07T04:59:12.000Z","dependencies_parsed_at":"2025-05-07T21:49:48.866Z","dependency_job_id":null,"html_url":"https://github.com/rupachowrasia/nodejs-event-emitter-for-pub-sub","commit_stats":null,"previous_names":["rupachowrasia/nodejs-event-emitter-for-pub-sub"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/rupachowrasia/nodejs-event-emitter-for-pub-sub","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rupachowrasia%2Fnodejs-event-emitter-for-pub-sub","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rupachowrasia%2Fnodejs-event-emitter-for-pub-sub/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rupachowrasia%2Fnodejs-event-emitter-for-pub-sub/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rupachowrasia%2Fnodejs-event-emitter-for-pub-sub/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rupachowrasia","download_url":"https://codeload.github.com/rupachowrasia/nodejs-event-emitter-for-pub-sub/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rupachowrasia%2Fnodejs-event-emitter-for-pub-sub/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32329463,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-26T23:26:28.701Z","status":"online","status_checked_at":"2026-04-27T02:00:06.769Z","response_time":128,"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":["emitter","eventsemitter","node-eventemitter","node-events","nodejs","pubsub","ticketing-system"],"created_at":"2025-05-07T21:49:47.365Z","updated_at":"2026-04-27T08:32:27.396Z","avatar_url":"https://github.com/rupachowrasia.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Node.js Event Emitters\n\u003e In Node.js, the events module provides a way to implement event-driven architecture, where different parts of your application can communicate via emitting and listening to events.\n\n## 🧵 When to Use\n\n- Logging\n- Messaging/event systems\n- Async task management (e.g., background workers)\n- Microservices event communication\n- Streaming APIs\n- Real-world use case - chat app, ticket system and logger\n\n## 📚 Key Methods\n- emitter.on(): Adds an event listener\n- emitter.emit(): Triggers an event\n- emitter.once(): Listens only for the first occurrence\n- emitter.removeListener() / off(): Removes a listener\n- emitter.removeAllListeners(): Clears all listeners for a given event\n\n## 🚨 Tips\n- Don’t forget to remove unused listeners to avoid memory leaks.\n- You can increase the listener limit (default is 10):\n\n## 🛠 Tech Stack\n\n- Node.js \n- Node.js events module\n\n## 📦 Installation\n\n```bash\n# Clone the repo\ngit clone https://github.com/rupachowrasia/nodejs-event-emitter-for-pub-sub.git\n\n# Move into the project directory\ncd nodejs-event-emitter-for-pub-sub\n\n# Install dependencies\nnpm install\n\n# Run the app\nnpm run start\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frupachowrasia%2Fnodejs-event-emitter-for-pub-sub","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frupachowrasia%2Fnodejs-event-emitter-for-pub-sub","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frupachowrasia%2Fnodejs-event-emitter-for-pub-sub/lists"}