{"id":24379680,"url":"https://github.com/y-js/y-websockets-server","last_synced_at":"2025-04-10T21:10:09.617Z","repository":{"id":2232501,"uuid":"45806788","full_name":"y-js/y-websockets-server","owner":"y-js","description":"Websocket connector for Yjs (Node server)","archived":false,"fork":false,"pushed_at":"2023-11-02T11:09:47.000Z","size":217,"stargazers_count":22,"open_issues_count":6,"forks_count":10,"subscribers_count":5,"default_branch":"master","last_synced_at":"2025-03-28T20:05:56.803Z","etag":null,"topics":["yjs","yjs-connector"],"latest_commit_sha":null,"homepage":null,"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/y-js.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":"2015-11-09T00:58:52.000Z","updated_at":"2025-02-19T06:48:26.000Z","dependencies_parsed_at":"2024-06-19T19:07:48.564Z","dependency_job_id":"7d657e2d-d135-4f1c-98c4-766f924b8698","html_url":"https://github.com/y-js/y-websockets-server","commit_stats":{"total_commits":82,"total_committers":5,"mean_commits":16.4,"dds":0.04878048780487809,"last_synced_commit":"370a99ccd30a3a8eac05b66a24388ffd7f0471df"},"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/y-js%2Fy-websockets-server","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/y-js%2Fy-websockets-server/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/y-js%2Fy-websockets-server/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/y-js%2Fy-websockets-server/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/y-js","download_url":"https://codeload.github.com/y-js/y-websockets-server/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247856541,"owners_count":21007620,"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":["yjs","yjs-connector"],"created_at":"2025-01-19T07:18:45.058Z","updated_at":"2025-04-10T21:10:09.602Z","avatar_url":"https://github.com/y-js.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# (LEGACY) Websockets Connector for [Yjs](https://github.com/y-js/yjs) (Server) \n\u003e Note: this is an outdated repository which is not compatible with y-websocket or Yjs\u003e=v13\n\n*y-websockets-server* is the connection point for *y-websockets-client*. It saves the shared data (using the [memory](https://github.com/y-js/y-memory) or the [leveldb](https://github.com/y-js/y-leveldb) database adapter), and distributes it efficiently to all connected clients.\n\n#### Instructions for [y-leveldb](https://github.com/y-js/y-leveldb)\n\nThe memory database adapter is installed by default. If you intend to use the [y-leveldb](https://github.com/y-js/y-leveldb) database adapter, make sure to install it first.\n\n```sh\nnpm install --save y-leveldb [-g]\n```\n\n### Global installation (easy)\n* Install package `npm install -g y-websockets-server`\n* Execute binary `y-websockets-server [--port port] [--db db]` (defaults: port = 1234, db = `memory` (choose either `leveldb` or `memory`)).\n\nYjs uses [debug](https://github.com/visionmedia/debug) for logging. In order to\nturn on logging set the environment variable `DEBUG` to `y*,-y:connector-message`: I.e\n\n```sh\nDEBUG=y*,-y:connector-message y-websockets-server --port 1234\n```\n\nThis is how you redirect the output to a file:\n\n```sh\nDEBUG_COLORS=0 DEBUG=y*,-y:connector-message y-websockets-server --port 1234 \u003e log.txt\n```\n\n### Local installation (recommended if you intend to modify y-websockets-server)\n\n* Set up a new project\n\n        mkdir my-y-websockets-server \u0026\u0026 cd $_ \u0026\u0026 git init \u0026\u0026 npm init \u0026\u0026 echo \"node_modules\" \u003e .gitignore\n\n* Install `npm i --save y-websockets-server`\n* Copy executable `cp node_modules/y-websockets-server/src/server.js .`\n* Start server `node server.js`\n\n### Setup with Docker\n\n* Clone this repository and navigate to it.\n* Build the image: `docker build -t y-websockets-server .`\n* Run it: `docker run -it --rm -p 1234:1234 --name y-websockets-server y-websockets-server`\n* Feel free to modify the port argument, e.g. to `-p 1773:1234` to run it at port 1773.\n\n### Setup with Heroku\nHeroku is really easy to set up, and you get a free *y-websockets-server* with https!\nPreliminarily you have to set up heroku - see this great [getting started guide](https://devcenter.heroku.com/articles/getting-started-with-nodejs#introduction)\n\n* Perform the steps from the local installation\n* Create Procfile `echo \"web: DEBUG=y*,-y:connector-message server.js\" \u003e Procfile`\n* Specify a node environment. Add this to your package.json:\n\n        \"engines\": {\n          \"node\": \"6.9.1\"\n        }\n\n* Add heroku app `heroku create my-websockets-server`\n* Commit \u0026 Push to heroku `git add -A \u0026\u0026 git commit -am 'init' \u0026\u0026 git push heroku master`\n* Start app `heroku ps:scale web=1`\n* Get the url for your websockes-server instance `heroku info` (see *Web Url*).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fy-js%2Fy-websockets-server","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fy-js%2Fy-websockets-server","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fy-js%2Fy-websockets-server/lists"}