{"id":37331017,"url":"https://github.com/piesocket/piesocket-nodejs","last_synced_at":"2026-01-16T03:35:40.635Z","repository":{"id":57324032,"uuid":"405930738","full_name":"piesocket/piesocket-nodejs","owner":"piesocket","description":"NodeJS WebSocket Publishing Library ","archived":false,"fork":false,"pushed_at":"2025-05-10T11:38:55.000Z","size":8,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-09-23T18:34:32.242Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","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/piesocket.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}},"created_at":"2021-09-13T10:39:14.000Z","updated_at":"2025-05-10T11:38:42.000Z","dependencies_parsed_at":"2022-09-09T09:21:48.984Z","dependency_job_id":null,"html_url":"https://github.com/piesocket/piesocket-nodejs","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/piesocket/piesocket-nodejs","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/piesocket%2Fpiesocket-nodejs","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/piesocket%2Fpiesocket-nodejs/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/piesocket%2Fpiesocket-nodejs/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/piesocket%2Fpiesocket-nodejs/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/piesocket","download_url":"https://codeload.github.com/piesocket/piesocket-nodejs/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/piesocket%2Fpiesocket-nodejs/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28477204,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-16T03:13:13.607Z","status":"ssl_error","status_checked_at":"2026-01-16T03:11:47.863Z","response_time":107,"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":"2026-01-16T03:35:39.944Z","updated_at":"2026-01-16T03:35:40.622Z","avatar_url":"https://github.com/piesocket.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# PieSocket NodeJS Server SDK\n\nA NodeJS Library for PieSocket Channels.\n\n[PieSocket Channels](https://www.piesocket.com/blog/channels/) are a medium for clients and servers to communicate in real-time. Client-to-client communications are also supported.\n\nNote: This package is PieSocket Server SDK, if you are looking for Client SDK (to use with Frontend on browsers), please see [PieSocketJS](https://github.com/piesocket/piesocket-js).\n## Installation\n\nYarn\n```\nyarn add piesocket-nodejs\n```\n\nNPM\n```\nnpm i piesocket-nodejs\n```\n\n## Importing\n\nImport module:\n\n```javascript\nconst PieSocket = require(\"piesocket-nodejs\");\n```\n\n\n\n## Publishing messages\n\n1. Initialize the PieSocket class:\n```javascript\nvar piesocket = new PieSocket({\n    clusterId: 'YOUR_CLUSTER_ID',\n    apiKey: 'YOUR_API_KEY',\n    secret: 'YOUR_API_SECRET'\n});\n```\n\n2. Publish events:\n```javascript\npiesocket.publish(\"channel\", \"event-name\" , data, meta);\n```\n[Channel ID](https://www.piesocket.com/docs/3.0/overview) can be a string or number,\n`data` should be JSON.\n`meta` can be `null` or JSON.\n\n## Supported Methods\nList of available methods on the PieSocket object\n\n| Method                | Description                                     | Returns  |\n| ----------------------------- | ----------------------------------------------------------------------------- | -------------- |\n| publish(channel ,event ,data ,meta)    | Publish an event to a channel                       |  Promise |\n\n\n\n\n## Configuration\nComplete list of allowed configuration options\n\n| Option                | Description                                     | Default  |\n| ----------------------------- | ----------------------------------------------------------------------------- | -------------- |\n| apiKey             | Your PieSocket API key                |  null |\n| clusterId          | Your API key's cluster ID                       |  `demo` |\n| secret             | Your PieSocket API key                       |  null |\n\n  \n## Reference\n- PieSocketJS: [PieSocket Browser SDK](https://github.com/piesocket/piesocket-js)\n- Documentation: [PieSocket WebSocket docs](https://piesocket.com/docs)","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpiesocket%2Fpiesocket-nodejs","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpiesocket%2Fpiesocket-nodejs","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpiesocket%2Fpiesocket-nodejs/lists"}