{"id":15674952,"url":"https://github.com/cmorten/refresh","last_synced_at":"2025-05-06T23:32:29.849Z","repository":{"id":62422443,"uuid":"443778930","full_name":"cmorten/refresh","owner":"cmorten","description":"Simple browser reload on file change middleware for your Deno web applications.","archived":false,"fork":false,"pushed_at":"2024-01-28T09:43:18.000Z","size":12,"stargazers_count":14,"open_issues_count":2,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-10T19:08:07.606Z","etag":null,"topics":["deno","deno-module","denoland"],"latest_commit_sha":null,"homepage":"https://deno.land/x/refresh","language":"TypeScript","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/cmorten.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE","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},"funding":{"github":["cmorten"]}},"created_at":"2022-01-02T13:55:59.000Z","updated_at":"2024-01-28T09:43:08.000Z","dependencies_parsed_at":"2024-10-23T12:09:38.417Z","dependency_job_id":null,"html_url":"https://github.com/cmorten/refresh","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cmorten%2Frefresh","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cmorten%2Frefresh/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cmorten%2Frefresh/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cmorten%2Frefresh/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/cmorten","download_url":"https://codeload.github.com/cmorten/refresh/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252787288,"owners_count":21804228,"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":["deno","deno-module","denoland"],"created_at":"2024-10-03T15:53:39.246Z","updated_at":"2025-05-06T23:32:29.820Z","avatar_url":"https://github.com/cmorten.png","language":"TypeScript","funding_links":["https://github.com/sponsors/cmorten"],"categories":[],"sub_categories":[],"readme":"# refresh\n\nSimple browser reload on file change middleware for your Deno web applications.\n\n## Usage\n\nTo use `refresh` middleware, just add a few extra lines to your Deno server\nimplementation:\n\n```ts\nimport { serve } from \"https://deno.land/std/http/server.ts\";\nimport { refresh } from \"https://deno.land/x/refresh/mod.ts\";\n\n// Create refresh middleware\nconst middleware = refresh();\n\nserve((req) =\u003e {\n  // In your server handler, just add into the middleware stack!\n  const res = middleware(req);\n\n  if (res) return res;\n\n  return new Response(\"Hello Deno!\");\n});\n```\n\nAnd add a single `refresh/client.js` script tag anywhere to your HTML:\n\n```html\n\u003c!DOCTYPE html\u003e\n\u003chtml lang=\"en\"\u003e\n  \u003chead\u003e\n    \u003cmeta charset=\"utf-8\" /\u003e\n    \u003cmeta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\" /\u003e\n    \u003ctitle\u003eExample Refresh App\u003c/title\u003e\n  \u003c/head\u003e\n  \u003cbody\u003e\n    \u003cscript src=\"https://deno.land/x/refresh/client.js\"\u003e\u003c/script\u003e\n    \u003ch1\u003eHello Deno!\u003c/h1\u003e\n  \u003c/body\u003e\n\u003c/html\u003e\n```\n\nAnd you'll get instant browser refresh on every file change for your project 🚀 🚀\n\n## Example\n\nRun the example by cloning this repo locally and executing:\n\n```bash\ndeno run --allow-net --allow-read ./example/server.ts\n```\n\nOpen one or more browser tabs on `http://localhost:8000/` and start editing the\n`index.html` to see live reloading of all the tabs in the browser.\n\n## Documentation\n\nSee [Deno Docs](https://doc.deno.land/https://deno.land/x/refresh/mod.ts).\n\n## License\n\n[MIT License](LICENSE).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcmorten%2Frefresh","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcmorten%2Frefresh","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcmorten%2Frefresh/lists"}