{"id":16014889,"url":"https://github.com/thheller/cljs-cf-worker","last_synced_at":"2025-03-18T03:30:39.057Z","repository":{"id":237445780,"uuid":"716452374","full_name":"thheller/cljs-cf-worker","owner":"thheller","description":null,"archived":false,"fork":false,"pushed_at":"2023-11-09T07:11:26.000Z","size":23,"stargazers_count":10,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-10-15T15:21:12.505Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Clojure","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/thheller.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-11-09T07:00:07.000Z","updated_at":"2024-06-17T11:19:26.000Z","dependencies_parsed_at":"2024-05-02T00:13:09.264Z","dependency_job_id":"5ec3a738-912d-4e46-b1b5-326ac5c05732","html_url":"https://github.com/thheller/cljs-cf-worker","commit_stats":null,"previous_names":["thheller/cljs-cf-worker"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thheller%2Fcljs-cf-worker","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thheller%2Fcljs-cf-worker/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thheller%2Fcljs-cf-worker/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thheller%2Fcljs-cf-worker/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/thheller","download_url":"https://codeload.github.com/thheller/cljs-cf-worker/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":221704914,"owners_count":16866853,"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-10-08T15:05:26.297Z","updated_at":"2024-10-27T16:34:54.479Z","avatar_url":"https://github.com/thheller.png","language":"Clojure","funding_links":[],"categories":[],"sub_categories":[],"readme":"# cljs cloudflare worker\n\nExample for using CLJS to create a Cloudflare worker.\n\nThe `cljs-worker` dir was created via `npx wrangler generate my-project worker` and the `wranger.toml` updated to use the `out/main.js` file instead of `index.js`. `out/main.js` is the file created by `shadow-cljs` as per the `shadow-cljs.edn` `:worker` build config.\n\n\n## Development\n\n```sh\nnpx shadow-cljs watch worker\nnpx wranger -c cljs-worker/wranger.toml dev\n```\n\nThe runtime doesn't seem to allow IO outside of request handlers, thus a websocket connection for the REPL is not supported. If you still want a REPL while development you can run `npx shadow-cljs node-repl` to get one. It won't be in the wrangler runtime though. I have never used this in anger, so I'm not sure how useful a REPL into the process would be. It seems to be reset for every request anyway.\n\n## Deploy\n```sh\nrm -rf cljs-worker/out\nnpx shadow-cljs release worker\nnpx wranger ...\n```\n\nI did not test the deploy part, since I do not have a cloudflare account. I'm confident it'll just work though.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthheller%2Fcljs-cf-worker","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fthheller%2Fcljs-cf-worker","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthheller%2Fcljs-cf-worker/lists"}