{"id":20828772,"url":"https://github.com/perty/service-worker-test","last_synced_at":"2026-04-20T22:06:44.497Z","repository":{"id":167929488,"uuid":"643226311","full_name":"perty/service-worker-test","owner":"perty","description":"An example of using Service Worker and Notifications. ","archived":false,"fork":false,"pushed_at":"2023-05-21T15:13:18.000Z","size":7,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-01-18T18:39:05.354Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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/perty.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":"2023-05-20T13:48:44.000Z","updated_at":"2023-05-20T13:49:11.000Z","dependencies_parsed_at":null,"dependency_job_id":"1ea247eb-a628-4089-ba03-8423fd407972","html_url":"https://github.com/perty/service-worker-test","commit_stats":null,"previous_names":["perty/service-worker-test"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/perty%2Fservice-worker-test","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/perty%2Fservice-worker-test/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/perty%2Fservice-worker-test/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/perty%2Fservice-worker-test/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/perty","download_url":"https://codeload.github.com/perty/service-worker-test/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243179813,"owners_count":20249179,"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":[],"created_at":"2024-11-17T23:18:25.361Z","updated_at":"2025-12-26T22:56:11.946Z","avatar_url":"https://github.com/perty.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Service worker test\n\nThis is for me learning about service workers and notifications.\n\nThe goal is to have a local environment where I can try service worker related things, notifications in particular. \n\nI like to write as many notes as possible to keep my learnings.\n\n## A local server with https\n\nService workers are only available when using https, one reason being that they can intercept network traffic.\n\n### Certificate\n\nSo the first thing is to set up a server that serves pages by https. To do that, we first need a certificate. I opted for [mkcert](https://github.com/FiloSottile/mkcert#installation).\n\nThere is an installation file for Mac using brew: `installt-mkcert.sh`.\n\nThen head to the `cert` folder and run `cert-here.sh`. This will create necessary files for the server.\n\n### Server\n\nTo run a server, there are several options, [http-server](https://www.npmjs.com/package/http-server) being a very simple one.\n\nStart the server with `start-server.sh`. The page should show up on [https://localhost:8080](https://localhost:8080).\n\n## Notifications\n\nNot as easy as it seemed when I started to look at it. A great promise by PWA to be able to send notifications. But wait, some notifications are local and some are remote. And the remote ones, initiated from the server, requires the push API. \n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fperty%2Fservice-worker-test","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fperty%2Fservice-worker-test","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fperty%2Fservice-worker-test/lists"}