{"id":15043760,"url":"https://github.com/holytiny/feathersjs-wxmp-socket.io-client","last_synced_at":"2025-04-14T23:12:51.544Z","repository":{"id":57116298,"uuid":"216964720","full_name":"holytiny/feathersjs-wxmp-socket.io-client","owner":"holytiny","description":":dragon: Feathersjs 框架的微信小程序websocket客户端","archived":false,"fork":false,"pushed_at":"2019-12-02T14:58:31.000Z","size":28218,"stargazers_count":10,"open_issues_count":0,"forks_count":1,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-04-14T23:12:43.884Z","etag":null,"topics":["feathersjs","mini-program","socket-io","socket-io-client","websocket-client","wechat"],"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/holytiny.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":"2019-10-23T04:01:21.000Z","updated_at":"2024-10-16T07:25:54.000Z","dependencies_parsed_at":"2022-08-22T22:20:12.777Z","dependency_job_id":null,"html_url":"https://github.com/holytiny/feathersjs-wxmp-socket.io-client","commit_stats":null,"previous_names":[],"tags_count":16,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/holytiny%2Ffeathersjs-wxmp-socket.io-client","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/holytiny%2Ffeathersjs-wxmp-socket.io-client/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/holytiny%2Ffeathersjs-wxmp-socket.io-client/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/holytiny%2Ffeathersjs-wxmp-socket.io-client/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/holytiny","download_url":"https://codeload.github.com/holytiny/feathersjs-wxmp-socket.io-client/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248975328,"owners_count":21192210,"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":["feathersjs","mini-program","socket-io","socket-io-client","websocket-client","wechat"],"created_at":"2024-09-24T20:49:33.710Z","updated_at":"2025-04-14T23:12:51.526Z","avatar_url":"https://github.com/holytiny.png","language":"JavaScript","readme":"\n# feathersjs-socketio-wxmp-client\n\n[![lerna](https://img.shields.io/badge/maintained%20with-lerna-cc00ff.svg)](https://lerna.js.org/)\n\n\u0026emsp;\u0026emsp;Feathersjs框架的微信小程序websocket客户端。\n\n## 使用说明\n```shell script\n npm install @holytiny/wxmp-socket.io-client --save\n```\n\u0026emsp;\u0026emsp;在client.js中\n```js\nimport feathers from '@feathersjs/feathers';\nimport auth from '@feathersjs/authentication-client';\nimport feathersSocketioClient from '@feathersjs/socketio-client';\nimport io from '@holytiny/wxmp-socket.io-client';\n\nimport Debug from 'debug';\nif ('production'.localeCompare(process.env.NODE_ENV) !== 0) {\n  Debug.enable('*');\n}\nconst debug = Debug('@feathersjs/socketio-client');\n\nexport default function FeathersClient () {\n  debug('create socketio client');\n  const socketioInit = io('http://localhost:3030', {\n    transports: ['websocket'],\n    forceNew: true,\n    timeout: false\n  });\n\n  const feathersClient = feathers();\n//feathersClient.configure(feathersSocketioClient(socketioInit, { timeout: 1000 * 20 }));\n  feathersClient.configure(feathersSocketioClient(socketioInit));\n  feathersClient.configure(auth());\n\n  return feathersClient;\n}\n```\n\u0026emsp;\u0026emsp;在xxx.js中\n```js\nimport FeathersClient from './client';\nconst feathersClient = FeathersClient();\n```\n\u0026emsp;\u0026emsp;具体使用请参考Feathersjs的[@feathersjs/socketio-client](https://docs.feathersjs.com/api/client/socketio.html)文档\n\n## @holytiny/wxmp-socket.io-client\n\n\u0026emsp;\u0026emsp;[@holytiny/wxmp-socket.io-client](https://github.com/holytiny/feathersjs-wxmp-socket.io-client/tree/master/packages/wxmp-socket.io-client)是本项目的一个包，提供了[Socket.IO-client](https://socket.io/docs/client-api/)在微信小程序环境下的兼容版本。\n这个包可以单独使用，具体请看[说明](https://github.com/holytiny/feathersjs-wxmp-socket.io-client/tree/master/packages/wxmp-socket.io-client#readme)。\n\n## License\n\n[MIT](/LICENSE)\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fholytiny%2Ffeathersjs-wxmp-socket.io-client","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fholytiny%2Ffeathersjs-wxmp-socket.io-client","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fholytiny%2Ffeathersjs-wxmp-socket.io-client/lists"}