{"id":20199914,"url":"https://github.com/fortunejs/fortune-ws","last_synced_at":"2025-07-31T17:42:18.265Z","repository":{"id":57241048,"uuid":"71253507","full_name":"fortunejs/fortune-ws","owner":"fortunejs","description":"WebSocket server and client for Fortune.js.","archived":false,"fork":false,"pushed_at":"2018-09-28T02:37:21.000Z","size":48,"stargazers_count":3,"open_issues_count":1,"forks_count":2,"subscribers_count":5,"default_branch":"master","last_synced_at":"2025-04-06T14:41:36.335Z","etag":null,"topics":["websockets"],"latest_commit_sha":null,"homepage":null,"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/fortunejs.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":"2016-10-18T13:53:24.000Z","updated_at":"2018-10-17T11:25:18.000Z","dependencies_parsed_at":"2022-09-07T23:13:00.019Z","dependency_job_id":null,"html_url":"https://github.com/fortunejs/fortune-ws","commit_stats":null,"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fortunejs%2Ffortune-ws","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fortunejs%2Ffortune-ws/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fortunejs%2Ffortune-ws/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fortunejs%2Ffortune-ws/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/fortunejs","download_url":"https://codeload.github.com/fortunejs/fortune-ws/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248208550,"owners_count":21065202,"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":["websockets"],"created_at":"2024-11-14T04:40:25.430Z","updated_at":"2025-04-10T11:09:16.096Z","avatar_url":"https://github.com/fortunejs.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Fortune WebSocket\n\n[![Build Status](https://img.shields.io/travis/fortunejs/fortune-ws/master.svg?style=flat-square)](https://travis-ci.org/fortunejs/fortune-ws)\n[![npm Version](https://img.shields.io/npm/v/fortune-ws.svg?style=flat-square)](https://www.npmjs.com/package/fortune-ws)\n[![License](https://img.shields.io/npm/l/fortune-ws.svg?style=flat-square)](https://raw.githubusercontent.com/fortunejs/fortune-ws/master/LICENSE)\n\nThis is a WebSocket implementation for Fortune.js, which implements a wire protocol based on MessagePack.\n\n```sh\n$ npm install fortune-ws --save\n```\n\n\n## Usage\n\nConsult the [source code](https://github.com/fortunejs/fortune-ws/tree/master/lib) or the [documentation website](http://fortune.js.org/api) for more information.\n\n```js\nconst fortuneWS = require('fortune-ws')\n\n// Pass in a Fortune instance and an optional change function,\n// options object, and connection callback.\nconst server = fortuneWS(instance, change, options, callback)\n\n// There is also a client request function.\nconst promise = fortuneWS.request(client, options, state)\n\n// Automatically syncing client, given a Fortune instance.\nconst listener = fortuneWS.sync(client, instance)\n```\n\nThe browser version includes the client implementations but not the server.\n\n\n## License\n\nThis software is licensed under the [MIT license](https://raw.githubusercontent.com/fortunejs/fortune-ws/master/LICENSE).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffortunejs%2Ffortune-ws","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffortunejs%2Ffortune-ws","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffortunejs%2Ffortune-ws/lists"}