{"id":17967570,"url":"https://github.com/simonprickett/server-sent-events-demo","last_synced_at":"2025-03-25T08:31:21.643Z","repository":{"id":50576297,"uuid":"113403611","full_name":"simonprickett/server-sent-events-demo","owner":"simonprickett","description":"Server Sent Events Demo for San Diego JS Meetup using Node, HTML, JavaScript, CSS.","archived":false,"fork":false,"pushed_at":"2022-05-30T18:21:17.000Z","size":792,"stargazers_count":41,"open_issues_count":0,"forks_count":12,"subscribers_count":1,"default_branch":"develop","last_synced_at":"2025-03-19T23:52:55.757Z","etag":null,"topics":["javascript","node-js","nodejs","server-sent-events"],"latest_commit_sha":null,"homepage":"https://simonprickett.dev/a-look-at-server-sent-events/","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/simonprickett.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":"2017-12-07T04:41:21.000Z","updated_at":"2025-03-13T09:20:24.000Z","dependencies_parsed_at":"2022-09-11T02:23:12.455Z","dependency_job_id":null,"html_url":"https://github.com/simonprickett/server-sent-events-demo","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/simonprickett%2Fserver-sent-events-demo","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/simonprickett%2Fserver-sent-events-demo/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/simonprickett%2Fserver-sent-events-demo/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/simonprickett%2Fserver-sent-events-demo/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/simonprickett","download_url":"https://codeload.github.com/simonprickett/server-sent-events-demo/tar.gz/refs/heads/develop","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245426253,"owners_count":20613318,"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":["javascript","node-js","nodejs","server-sent-events"],"created_at":"2024-10-29T14:09:07.165Z","updated_at":"2025-03-25T08:31:21.228Z","avatar_url":"https://github.com/simonprickett.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Server Sent Events Demo\n\nA small Server Sent Events demo for [San Diego JS](http://sandiegojs.org/) Meetup using Node, HTML, JavaScript, CSS.  I also wrote a [post on my website](https://simonprickett.dev/a-look-at-server-sent-events/) about this topic wihich includes a video of me presenting about it at the Meetup.\n\n![demo](sse_demo.gif)\n\nSlides can be found [here](https://docs.google.com/presentation/d/1ueJ6ewO3i34OXRBI8mY6g26cKbkPDf4cNSrtX4ULBx4/edit?usp=sharing).\n\n## Running this Project\n\nThe following instructions assume Mac OS / Linux system with Python installed (to provide a simple web server).\n\n### Get the Code using a Terminal Window\n\n```bash\n$ git clone https://github.com/simonprickett/server-sent-events-demo.git\n$ cd server-sent-events-demo\n```\n\n### Start the Server in a Terminal Window\n\n```bash\n$ cd src/server\n$ npm install\n$ npm start\n```\n\n### Start the Client in another Terminal Window\n\n```bash\n$ cd src/client\n$ python -m SimpleHTTPServer\n```\n\nor...\n\n```bash\n$ cd src/client\n$ python3 -m http.server\n```\n\nThen point a browser at `http://localhost:8000/`.\n\n## Reference Materials\n\n* [MDN Server Sent Events Guide](https://developer.mozilla.org/en-US/docs/Web/API/Server-sent_events/Using_server-sent_events)\n* [HTML 5 Rocks Tutorial](https://www.html5rocks.com/en/tutorials/eventsource/basics/)\n* [O'Reilly High Performance Browser Networking SSE page](https://hpbn.co/server-sent-events-sse/)\n* [Data source for cat facts](https://github.com/vadimdemedes/cat-facts)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsimonprickett%2Fserver-sent-events-demo","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsimonprickett%2Fserver-sent-events-demo","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsimonprickett%2Fserver-sent-events-demo/lists"}