{"id":19805343,"url":"https://github.com/matter-in-motion/mm-websockets","last_synced_at":"2026-04-11T20:40:05.709Z","repository":{"id":57299160,"uuid":"98261460","full_name":"matter-in-motion/mm-websockets","owner":"matter-in-motion","description":"Websockets transport","archived":false,"fork":false,"pushed_at":"2018-04-26T18:55:17.000Z","size":6,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-02-16T03:31:44.652Z","etag":null,"topics":["api","extension","matter-in-motion","transport","websocket","websocket-transport","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/matter-in-motion.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":"2017-07-25T03:44:41.000Z","updated_at":"2018-04-26T18:55:14.000Z","dependencies_parsed_at":"2022-08-26T18:02:39.708Z","dependency_job_id":null,"html_url":"https://github.com/matter-in-motion/mm-websockets","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/matter-in-motion%2Fmm-websockets","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/matter-in-motion%2Fmm-websockets/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/matter-in-motion%2Fmm-websockets/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/matter-in-motion%2Fmm-websockets/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/matter-in-motion","download_url":"https://codeload.github.com/matter-in-motion/mm-websockets/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":240934439,"owners_count":19880992,"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":["api","extension","matter-in-motion","transport","websocket","websocket-transport","websockets"],"created_at":"2024-11-12T09:03:29.691Z","updated_at":"2025-10-14T15:38:16.985Z","avatar_url":"https://github.com/matter-in-motion.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Matter In Motion. Websockets transport\n\n[![NPM Version](https://img.shields.io/npm/v/mm-websockets.svg?style=flat-square)](https://www.npmjs.com/package/mm-websockets)\n[![NPM Downloads](https://img.shields.io/npm/dt/mm-websockets.svg?style=flat-square)](https://www.npmjs.com/package/mm-websockets)\n\nWebsocket transport extension for [matter in motion](https://github.com/matter-in-motion/mm) framework\n\n## Usage\n\n[Transport installation instructions](https://github.com/matter-in-motion/mm/blob/master/docs/transports.md)\n\n### Protocol\n\nWebsockets from the browser:\n\n```js\nconst msg = [ \u003crequest\u003e, \u003cdata object\u003e, \u003chead object\u003e, \u003crequestId\u003e ];\nconst con = new WebSocket('ws://localhost:3000/api');\ncon.onmessage = function(e) {\n  const res = JSON.parse(e.data);\n  console.log(res);\n}\n\ncon.onopen = function() {\n  con.send(JSON.stringify(msg));\n};\n```\n\n## Settings\n\n* __pingInterval__ — number. Ping interval in milliseconds\n* __type__ string, 'application/json'. Default type of data, 'application/json' is onlt available option for now.\n* __port__ number, if defined creates its own http server and listens `port`, otherwise tries to use [http transport](https://github.com/matter-in-motion/mm-http) server\n* serializer — string, serializer name to be used as default for websockets messages instead of default\n\n\nLicense: MIT.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmatter-in-motion%2Fmm-websockets","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmatter-in-motion%2Fmm-websockets","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmatter-in-motion%2Fmm-websockets/lists"}