{"id":19753906,"url":"https://github.com/trisha/websocket-example","last_synced_at":"2026-02-13T21:33:58.384Z","repository":{"id":219703521,"uuid":"749688980","full_name":"trisha/websocket-example","owner":"trisha","description":"Minimalistic websocket server + client ","archived":false,"fork":false,"pushed_at":"2024-06-14T21:25:43.000Z","size":7593,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-10-07T12:05:49.706Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"HTML","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/trisha.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":"2024-01-29T07:40:34.000Z","updated_at":"2024-06-14T21:25:46.000Z","dependencies_parsed_at":null,"dependency_job_id":"9e445cfb-df18-42d0-9856-34f586166ef7","html_url":"https://github.com/trisha/websocket-example","commit_stats":null,"previous_names":["trisha/websocket-server"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/trisha/websocket-example","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/trisha%2Fwebsocket-example","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/trisha%2Fwebsocket-example/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/trisha%2Fwebsocket-example/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/trisha%2Fwebsocket-example/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/trisha","download_url":"https://codeload.github.com/trisha/websocket-example/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/trisha%2Fwebsocket-example/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29418538,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-13T06:24:03.484Z","status":"ssl_error","status_checked_at":"2026-02-13T06:23:12.830Z","response_time":78,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":[],"created_at":"2024-11-12T02:55:37.573Z","updated_at":"2026-02-13T21:33:58.364Z","avatar_url":"https://github.com/trisha.png","language":"HTML","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Context\nI created this proof-of-concept (POC) because all the examples I could find online weren't working. You need both a websocket-toggled client *and* a websocket-enabled server in order for it to work, and the sample websocket server that I was trying to use (https://echo.websocket.org/) was offline at the time.\n\n# Running the websocket server\nRun `npm install` to install dependencies\n\nRun `npm start` to run the server (`index.js`), hosted at localhost:8080\n\nYou'll see an \"Upgrade Required` message if you go to localhost:8080 in your browser, meaning your client has to request a websocket upgrade.\n\n# Running the websocket interface\nConfirm that the server address (wsUri) in `client.html` matches localhost:8080. Then copy the file path, and paste the file path into browser of your choice to run it locally. For me the file path is `/Users/trishapan/Documents/code/websocket-server/client.html`\n\nEt voilà! Play around with having multiple Chrome profiles open, as well as Chrome Incognito tabs (cmd+shift+N) to send messages!\n\nP.S. You will have to refresh your HTML file/browser ever time you make a change to the client OR the server, because the server automatically resets due to nodemon watching for changes.\n\n\u003c!-- Useful git notes: https://pow123.github.io/Getting-Started-Git/03-create/ --\u003e\n\u003c!-- Use npm config notes: https://www.freecodecamp.org/news/full-stack-project-tutorial-create-a-notes-app-using-react-and-node-js/#part-2-create-the-backend --\u003e\n\nClient preview:\n![screenshot of 3 browsers connected to the same socket](/client_preview.png)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftrisha%2Fwebsocket-example","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftrisha%2Fwebsocket-example","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftrisha%2Fwebsocket-example/lists"}