{"id":24226653,"url":"https://github.com/vite-plugin-socket-io/vite-plugin-socket-io","last_synced_at":"2025-09-22T17:31:51.145Z","repository":{"id":57393194,"uuid":"429882922","full_name":"vite-plugin-socket-io/vite-plugin-socket-io","owner":"vite-plugin-socket-io","description":"Plugin to add socket.io to a Vite server","archived":false,"fork":false,"pushed_at":"2024-03-21T22:35:54.000Z","size":10,"stargazers_count":3,"open_issues_count":1,"forks_count":4,"subscribers_count":1,"default_branch":"main","last_synced_at":"2024-12-13T20:38:35.190Z","etag":null,"topics":["plugin","socket","socket-io","socketio","vite","vite-plugin"],"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/vite-plugin-socket-io.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}},"created_at":"2021-11-19T17:32:58.000Z","updated_at":"2024-05-20T14:02:30.000Z","dependencies_parsed_at":"2024-03-21T23:34:14.470Z","dependency_job_id":"792f5b98-2ddb-4a1f-bf87-578271768981","html_url":"https://github.com/vite-plugin-socket-io/vite-plugin-socket-io","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vite-plugin-socket-io%2Fvite-plugin-socket-io","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vite-plugin-socket-io%2Fvite-plugin-socket-io/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vite-plugin-socket-io%2Fvite-plugin-socket-io/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vite-plugin-socket-io%2Fvite-plugin-socket-io/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/vite-plugin-socket-io","download_url":"https://codeload.github.com/vite-plugin-socket-io/vite-plugin-socket-io/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":233869025,"owners_count":18743095,"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":["plugin","socket","socket-io","socketio","vite","vite-plugin"],"created_at":"2025-01-14T09:16:24.217Z","updated_at":"2025-09-22T17:31:50.744Z","avatar_url":"https://github.com/vite-plugin-socket-io.png","language":"JavaScript","readme":"# Vite Plugin - socket.io\n\n## Description\nPlugin to add [socket.io](https://socket.io/) to a Vite server\n\n## Installation\n```\nnpm i -D vite-plugin-socket-io\n```\n\n## Basic Usage\n```js\n// vite.config.js\n\nimport vitePluginSocketIO from 'vite-plugin-socket.io'\nimport { defineConfig } from 'vite';\n\nexport default defineConfig({\n  plugins: [vitePluginSocketIO()]\n})\n```\n\n## Options\n### serverEvents\nFunction to run when initializing socket.io connection.  Check docs [here](./serverEvents/).\n### socketEvents\nFunction to run containing socket.io listener and emitters.  Check docs [here](./socketEvents/).\n\n## Additional Usage Examples\n### Add listeners\n\n```js\n// vite.config.js\n\nimport vitePluginSocketIO from 'vite-plugin-socket-io'\nimport { defineConfig } from 'vite';\n\nconst socketEvents = (io, socket) =\u003e {\n  console.log('socket.io - connection');\n  socket.on('disconnect', () =\u003e {\n    console.log(`socket.io - socket.id \\`${socket.id}\\` disconnected`)\n  })\n  socket.on('signin', () =\u003e {\n    console.log('socket.io - signin')\n  })\n}\n\nexport default defineConfig({\n  plugins: [vitePluginSocketIO({socketEvents})]\n})\n```\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvite-plugin-socket-io%2Fvite-plugin-socket-io","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fvite-plugin-socket-io%2Fvite-plugin-socket-io","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvite-plugin-socket-io%2Fvite-plugin-socket-io/lists"}