{"id":22329112,"url":"https://github.com/realtime-framework/realtimemessaging-javascript","last_synced_at":"2025-08-02T11:04:10.102Z","repository":{"id":57348900,"uuid":"65901950","full_name":"realtime-framework/RealtimeMessaging-Javascript","owner":"realtime-framework","description":"Realtime Cloud Messaging JavaScript SDK","archived":false,"fork":false,"pushed_at":"2017-06-21T12:08:04.000Z","size":359,"stargazers_count":4,"open_issues_count":0,"forks_count":3,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-07-04T09:07:53.802Z","etag":null,"topics":["realtime-messaging","typescript-library","umd-modules","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/realtime-framework.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":"2016-08-17T11:24:30.000Z","updated_at":"2020-06-30T06:30:04.000Z","dependencies_parsed_at":"2022-08-31T03:24:58.844Z","dependency_job_id":null,"html_url":"https://github.com/realtime-framework/RealtimeMessaging-Javascript","commit_stats":null,"previous_names":[],"tags_count":10,"template":false,"template_full_name":null,"purl":"pkg:github/realtime-framework/RealtimeMessaging-Javascript","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/realtime-framework%2FRealtimeMessaging-Javascript","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/realtime-framework%2FRealtimeMessaging-Javascript/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/realtime-framework%2FRealtimeMessaging-Javascript/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/realtime-framework%2FRealtimeMessaging-Javascript/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/realtime-framework","download_url":"https://codeload.github.com/realtime-framework/RealtimeMessaging-Javascript/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/realtime-framework%2FRealtimeMessaging-Javascript/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":268378745,"owners_count":24240896,"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","status":"online","status_checked_at":"2025-08-02T02:00:12.353Z","response_time":74,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":["realtime-messaging","typescript-library","umd-modules","websockets"],"created_at":"2024-12-04T03:14:30.885Z","updated_at":"2025-08-02T11:04:10.033Z","avatar_url":"https://github.com/realtime-framework.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"## Realtime Cloud Messaging JavaScript SDK\nPart of the [The Realtime® Framework](http://framework.realtime.co), Realtime Cloud Messaging (aka ORTC) is a secure, fast and highly scalable cloud-hosted Pub/Sub real-time message broker for web and mobile apps.\n\nIf your application has data that needs to be updated in the user’s interface as it changes (e.g. real-time stock quotes or ever changing social news feed) Realtime Cloud Messaging is the reliable, easy, unbelievably fast, “works everywhere” solution.\n\nWe have included the source code and licence for the sockjs-client library.\n\n## Installation\n\nIf you're using Realtime on a web page, you can install the library via:\n\n#### CDN\n\n```html\n\u003cscript src=\"//messaging-public.realtime.co/js/2.1.0/ortc.js\"\u003e\u003c/script\u003e\n```\n\nUsage:\n\n```javascript\nvar client = RealtimeMessaging.createClient();\nclient.setClusterUrl(\"http://ortc-developers.realtime.co/server/2.1/\");\nclient.connect('YOUR_APPKEY', 'token');\n\nclient.onConnected = function(client) {\n    console.log(\"realtime connected\");\n    client.subscribe(\"channel\", true, function(client, channel, message) {\n        console.log(\"Received message:\", message);\n    });\n}\n```\n\n#### Bower\n\n```bash\nbower install realtime\n```\nand then\n\n```html\n\u003cscript src=\"bower_components/realtime/dist/ortc-min.js\"\u003e\u003c/script\u003e\n```\n\nMore about Bower at [http://bower.io/](http://bower.io/)\n\n#### NPM\n\n```bash\nnpm install realtime-messaging --save\n```\n\nand then\n\n```javascript\nimport * as RealtimeMessaging from 'realtime-messaging';\n\nconst client = RealtimeMessaging.createClient();\nclient.setClusterUrl(\"http://ortc-developers.realtime.co/server/2.1/\");\nclient.connect('YOUR_APPKEY', 'token');\n\nclient.onConnected = (client) =\u003e {\n    console.log(\"realtime connected\");\n    client.subscribe(\"channel\", true, (client, channel, message) =\u003e {\n        console.log(\"Received message:\", message);\n    });\n}\n```\n\n## TypeScript usage in Angular4\n\n```typescript\nimport {Component, OnInit} from '@angular/core';\nimport * as Realtime from 'realtime-messaging';\n\n@Component({\n  selector: 'app-root',\n  templateUrl: './app.component.html',\n  styleUrls: ['./app.component.css']\n})\n\nexport class AppComponent  {\n  \n  constructor() {\n    const realtime = Realtime.createClient();\n    realtime.setClusterUrl(\"https://ortc-developers.realtime.co/server/ssl/2.1/\");\n    realtime.connect(\"YOUR_APPKEY\", \"SomeSecurityToken\");\n\n    realtime.onConnected = (client: Realtime.Client) =\u003e {\n      console.log(\"connected\");\n      \n      // subscribe a channel to receive message\n      client.subscribe(\"myChannel\", true, this.onMessage);\n    } \n  }\n\n  // A new message was received\n  onMessage(client: Realtime.Client, channel: string, message: string) {\n    console.log(\"Received message:\", message);\n  }\n}\n```\n\n## Quick Start Guide\n[http://messaging-public.realtime.co/documentation/starting-guide/quickstart-js.html](http://messaging-public.realtime.co/documentation/starting-guide/quickstart-js.html)\n\n## API Reference\n[http://messaging-public.realtime.co/documentation/javascript/2.1.0/OrtcClient.html](http://messaging-public.realtime.co/documentation/javascript/2.1.0/OrtcClient.html)\n\n\n## Authors\nRealtime.co\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frealtime-framework%2Frealtimemessaging-javascript","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frealtime-framework%2Frealtimemessaging-javascript","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frealtime-framework%2Frealtimemessaging-javascript/lists"}