{"id":16901447,"url":"https://github.com/jersou/desktop-web-app","last_synced_at":"2026-05-06T22:35:29.683Z","repository":{"id":228465854,"uuid":"774076893","full_name":"jersou/desktop-web-app","owner":"jersou","description":"Easily create a desktop (web) app... It serves a static dir and handle a routes array.","archived":false,"fork":false,"pushed_at":"2024-11-17T10:31:17.000Z","size":475,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-01-25T13:22:26.541Z","etag":null,"topics":["deno","htm","preact"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","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/jersou.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":"2024-03-18T22:45:14.000Z","updated_at":"2024-11-17T10:31:21.000Z","dependencies_parsed_at":"2024-03-20T01:26:14.939Z","dependency_job_id":"58386762-9957-4e6a-a3af-cf8fa3ac606c","html_url":"https://github.com/jersou/desktop-web-app","commit_stats":null,"previous_names":["jersou/desktop-web-app"],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jersou%2Fdesktop-web-app","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jersou%2Fdesktop-web-app/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jersou%2Fdesktop-web-app/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jersou%2Fdesktop-web-app/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jersou","download_url":"https://codeload.github.com/jersou/desktop-web-app/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244623073,"owners_count":20483070,"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","htm","preact"],"created_at":"2024-10-13T17:59:44.946Z","updated_at":"2026-05-06T22:35:29.637Z","avatar_url":"https://github.com/jersou.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# desktop-web-app\n\nEasily create a desktop (web) app... It serves a static dir and handle a routes array.\n\n\n## Features\n\n- use Deno for the backend\n- open the browser at startup (optionally)\n- optionally bundle frontend assets to run the app from web import\n- can be run from http (no need of install/clone)\n- example 2 \u0026 3\n  - the frontend use Htm \u0026 Preact (no frontend build)\n  - no build step (if run locally)\n  - websocket to detect frontend close and send data continuously\n  - detect backend stop from frontend\n\n## Usage\n\nWith `runDesktopWebApp()`\n```typescript\n// examples/02-WebSocket-runDesktopWebApp/example2.ts\nconst server = new ExampleServer();\nrunDesktopWebApp({\n  routes: server.routes,\n  assetsFromJson,\n  onListen: server.onListen,\n  openInBrowser: true,\n  openInBrowserAppMode: true,\n});\n```\n\nOr extends DesktopWebApp :\n```typescript\n// examples/03-bundled/example3.ts\nclass ExampleServer extends DesktopWebApp {\n  override routes = [\n    // ...\n  ];\n  // ...\n}\ncliteRun(ExampleServer, { mainFile: \"desktop-web-app\", dontPrintResult: true });\n```\n\n## Update asset bundle\n\nTo update [assets_bundle.json](assets_bundle.json) after frontend/* changes, use\n`--update`.\n\n```shell\ndeno run -A ./example.ts --open-in-browser --update\n```\n\nor `updateAssetsBundle` command\n\n```shell\ndeno run -A ./example.ts updateAssetsBundle\n```\n\n## Hot reload dev\n\n```shell\ndeno run -A --watch='*.ts,frontend/' --watch-exclude=assets_bundle.json ./example.ts --update --notExitIfNoClient=true\n```\n\n## Run from http\n\n```shell\ndeno run --allow-net=localhost:5555 https://raw.githubusercontent.com/jersou/desktop-web-app/refs/heads/main/examples/03-bundled/example3.ts\n# → Open http://localhost:5555/ in a browser\n```\n\n## Usage (example 3)\n\n```\n$ ./examples/03-bundled/example3.ts --help                  \nUsage: desktop-web-app [Options] [--] [command [command args]]\n\nCommands:\n  main             [default]\n  commandFromChild Command from example\n\nOptions:\n -h, --help                     Show this help                                                        [default: false]\n     --hostname                 Server hostname                                                 [default: \"localhost\"]\n     --port                     Server port                                                            [default: 5555]\n     --open-in-browser          Open with chromium/chrome/gio if true or with the parameter [default: \"google-chrome\"]\n     --open-in-browser-app-mode Add --app= to browser command if openInBrowser is used                 [default: true]\n     --not-exit-if-no-client    Keep the server alive after the last client disconnects               [default: false]\n     --option-from-child        Option from example                                                     [default: 123]\n```\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjersou%2Fdesktop-web-app","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjersou%2Fdesktop-web-app","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjersou%2Fdesktop-web-app/lists"}