{"id":20551700,"url":"https://github.com/clarketm/express-sse-example","last_synced_at":"2025-04-14T11:32:26.690Z","repository":{"id":86955273,"uuid":"148436019","full_name":"clarketm/express-sse-example","owner":"clarketm","description":"Real-time Express streaming API leveraging Server Sent Events (SSE)","archived":false,"fork":false,"pushed_at":"2018-09-12T07:28:07.000Z","size":30,"stargazers_count":4,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-28T00:44:16.607Z","etag":null,"topics":["express","server-sent-events","sse","streaming-api"],"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/clarketm.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":"2018-09-12T06:57:10.000Z","updated_at":"2018-12-13T07:14:38.000Z","dependencies_parsed_at":"2023-05-29T23:30:27.778Z","dependency_job_id":null,"html_url":"https://github.com/clarketm/express-sse-example","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/clarketm%2Fexpress-sse-example","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/clarketm%2Fexpress-sse-example/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/clarketm%2Fexpress-sse-example/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/clarketm%2Fexpress-sse-example/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/clarketm","download_url":"https://codeload.github.com/clarketm/express-sse-example/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248871990,"owners_count":21175332,"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":["express","server-sent-events","sse","streaming-api"],"created_at":"2024-11-16T02:33:08.505Z","updated_at":"2025-04-14T11:32:26.675Z","avatar_url":"https://github.com/clarketm.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# express-sse-example\nReal-time Express streaming API leveraging Server Sent Events (SSE) \n\n### Example\n\n#### Start\n```bash\n$ npm start\n```\n\n#### Subscribe (server-side)\n```bash\n# GET /eventstream\n$ curl -XGET \"http://localhost:3000/eventstream\"\n```\n\n#### Subscribe (client-side)\n```js\nconst es = new EventSource(\"http://localhost:3000/eventstream\");\nes.addEventListener(\"message\", event =\u003e console.log(JSON.parse(event.data)));\n```\n\n#### Publish a \"message\" event\n```bash\n# POST /message\n$ curl -XPOST \"http://localhost:3000/message\" -d \"some message\"\n```\n\n#### All subscribers will receive the event payload\n```json\n{\n  \"message\": \"some message\", \n  \"timestamp\": \"2018-09-12T07:25:45.403Z\"\n}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fclarketm%2Fexpress-sse-example","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fclarketm%2Fexpress-sse-example","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fclarketm%2Fexpress-sse-example/lists"}