{"id":26497737,"url":"https://github.com/bugwheels94/soxtend","last_synced_at":"2026-02-18T11:38:29.675Z","repository":{"id":38019168,"uuid":"482126599","full_name":"bugwheels94/soxtend","owner":"bugwheels94","description":"WebSockets Simplified inspired from HTTP","archived":false,"fork":false,"pushed_at":"2025-03-15T15:45:41.000Z","size":4307,"stargazers_count":2,"open_issues_count":2,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-10-30T03:27:52.387Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","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/bugwheels94.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":"2022-04-16T01:31:35.000Z","updated_at":"2024-08-17T06:39:35.000Z","dependencies_parsed_at":"2024-01-12T08:33:44.996Z","dependency_job_id":"3e534a9c-ca84-4e28-9adf-a6b109d6b7ba","html_url":"https://github.com/bugwheels94/soxtend","commit_stats":null,"previous_names":["bugwheels94/restify-websockets","bugwheels94/websocket-plus","bugwheels94/restify-websocket"],"tags_count":70,"template":false,"template_full_name":null,"purl":"pkg:github/bugwheels94/soxtend","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bugwheels94%2Fsoxtend","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bugwheels94%2Fsoxtend/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bugwheels94%2Fsoxtend/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bugwheels94%2Fsoxtend/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bugwheels94","download_url":"https://codeload.github.com/bugwheels94/soxtend/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bugwheels94%2Fsoxtend/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29578018,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-18T08:38:15.585Z","status":"ssl_error","status_checked_at":"2026-02-18T08:38:14.917Z","response_time":162,"last_error":"SSL_read: 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":"2025-03-20T13:57:40.913Z","updated_at":"2026-02-18T11:38:24.667Z","avatar_url":"https://github.com/bugwheels94.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003ch1 align=\"center\"\u003eSoxtend\u003c/h1\u003e\n\u003cp align=\"center\"\u003eEasiest Websocket library for big projects\u003c/p\u003e\n\n![alt text](docs/banner.png)\n\n## Why Another Library?\n\n1. Is event based system(.emit/.on) too basic to meet your app needs making development slow?\n1. Do you want to wait for server response while sending websocket message with ease?\n1. Do you want to use react-query with websockets?\n1. Do you want to deploy to multi-node cluster with ease using Redis without doing anything extra? (Coming Soon!)\n\n## Introduction\n\n`restify-websocket` provides a very lightweight HTTP similar API for using Websockets in Node/Browser. WebSocket code often gets confusing because of generic `.on` and `.emit` events. While HTTP model has REST standard for CRUD, Websockets have nothing more than socket.io(rooms, namespaces). This library provides:\n\n1. Connect, reconnect functionality out of the box. You just start sending messages and we take care of rest.\n1. If you are familiar with ExpressJS then this library you already know with few exceptions.\n1. Send Request from Browser like Fetch API and get promise in return\n\n## Examples\n\n### HTTP Get-like Request\n\n    // Browser\n    export const { client, receiver, socket } = new RestifyWebSocket(SERVER_URL)\n    // Request, just like HTTP(axios)\n    const response = await client.get('/users/123', {\n      body\n    })\n    console.log(response.data)\n\n\n\n    // Websocket Server, just like express\n    const { clients, router, server } = new RestifyWebSocket.Server()\n    router.get('/users/:userId', (req, res) =\u003e {\n      const userId = req.params.userId\n      const user = {\n        userId\n      }\n      res.status(200).send(user)\n    })\n\n### Sending data from Server\n\nMany times this happens that Websocket server sends data to Browser without being requested by Browser. For that case, receivers are available.\n\n    // BROWSER\n    export const { client, receiver, socket } = new RestifyWebSocket(SERVER_URL)\n    receiver.get('/stocks/:companyName', (request, response) =\u003e {\n      console.log(response.data)\n    })\n\n    // SERVER\n    const { clients, router, server } = new RestifyWebSocket.Server()\n    clients.find('*').get('/stocks/goldman-sachs', {\n      data: [1, 2, 3] // it is not body, like typical fetch, because we are sending for browser\n    })\n\n### Multiple Tabs Communication\n\nIf user is opening from multiple tabs and you want to update each tab, since this is a normal real-time application requirement\n\n    const { clients, router, server } = new RestifyWebSocket.Server()\n    router.patch('/users/:userId', (req, res) =\u003e {\n      const userId = req.params.userId\n      const user = // change user in DB\n      res.groupedClients.status(200).send(user) // will send to all sockets belongin to a group\n      res.send(user)  // This will send to current tab only that made the update request\n    })\n\nFor the above request, you will need a receiver since many tabs did not ask for this update\n\n    // Other tabs\n    export const { client, receiver, socket } = new RestifyWebSocket(SERVER_URL)\n    receiver.patch('/users/:userId', (request, response) =\u003e {\n      console.log(response.data)\n    })\n\nMeanwhile the tab that made the request in the first place will also get the acknowledgment of update fulfilled\n\n    // Tab that is making the user update request\n    export const { client, receiver, socket } = new RestifyWebSocket(SERVER_URL)\n    const { data } = await client.patch('/users/123', {\n      body: {\n        newName: 'james'\n      }\n    }\n    console.log(data) // Generally you dont want data here, since the receiver will also get the data for you.\n\n### Multiple Tabs Warning like Whatsapp\n\n    const { clients, router, server } = new RestifyWebSocket.Server()\n    router.get('/users/:userId', (req, res) =\u003e {\n      const userId = req.params.userId\n      const user = // change user in DB\n      res.othersInGroup.status(400).send(\"Please Close this Tab as you are open from another tab\")\n      res.send(user)  // This will send to current tab with the user info\n    })\n\n### With react-query\n\nComing soon!\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbugwheels94%2Fsoxtend","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbugwheels94%2Fsoxtend","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbugwheels94%2Fsoxtend/lists"}