{"id":24617915,"url":"https://github.com/jacoblincool/cloudflare-module-worker","last_synced_at":"2025-08-23T14:34:18.022Z","repository":{"id":39711496,"uuid":"453204760","full_name":"JacobLinCool/Cloudflare-Module-Worker","owner":"JacobLinCool","description":"A module worker template for Cloudflare Workers. Router, GitHub Action, ...","archived":false,"fork":false,"pushed_at":"2023-12-15T08:40:22.000Z","size":80,"stargazers_count":4,"open_issues_count":1,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-05-07T05:48:07.285Z","etag":null,"topics":["cloudflare","cloudflare-workers","workers"],"latest_commit_sha":null,"homepage":"","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/JacobLinCool.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2022-01-28T20:16:40.000Z","updated_at":"2024-05-19T19:20:38.000Z","dependencies_parsed_at":"2025-05-07T05:46:58.751Z","dependency_job_id":"021cd067-dcf1-4175-953f-8d66ada66353","html_url":"https://github.com/JacobLinCool/Cloudflare-Module-Worker","commit_stats":null,"previous_names":[],"tags_count":0,"template":true,"template_full_name":null,"purl":"pkg:github/JacobLinCool/Cloudflare-Module-Worker","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JacobLinCool%2FCloudflare-Module-Worker","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JacobLinCool%2FCloudflare-Module-Worker/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JacobLinCool%2FCloudflare-Module-Worker/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JacobLinCool%2FCloudflare-Module-Worker/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/JacobLinCool","download_url":"https://codeload.github.com/JacobLinCool/Cloudflare-Module-Worker/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JacobLinCool%2FCloudflare-Module-Worker/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":271752125,"owners_count":24814750,"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","status":"online","status_checked_at":"2025-08-23T02:00:09.327Z","response_time":69,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["cloudflare","cloudflare-workers","workers"],"created_at":"2025-01-24T23:41:39.853Z","updated_at":"2025-08-23T14:34:17.998Z","avatar_url":"https://github.com/JacobLinCool.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Cloudflare Module Worker\n\nA Module Worker Template for Cloudflare Workers.\n\nYou can use this template to build a CORS proxy, an API server, or serving static files.\n\n## Features\n\n-   📦 Fast Bundling and Minification (by [esbuild](https://esbuild.github.io/))\n-   🗂 Express-like Routing (by [itty-router](https://github.com/kwhitley/itty-router))\n-   ⚙️ Linting and Testing (by [ESLint](https://eslint.org/) \u0026 [Jest](https://jestjs.io/))\n-   🌈 Source Formatting (by [Prettier](https://prettier.io/))\n-   🦾 TypeScript Supported (by [TypeScript](https://www.typescriptlang.org/))\n-   🚦 GitHub Action CI/CD (Auto Deploy, Pull Request Check).\n-   🛠 Utility Function: [Headers](./src/headers.ts).\n\n## Usage\n\nYou can use `npm`, `yarn` or `pnpm` to install the dependencies. And I recommend you to use `pnpm`, which works well with this template.\n\nThere are some scripts in the package.json file:\n\n- `build`: Build the module worker.\n  - Bundled \u0026 Minified\n  - Stored in `dist` directory\n- `dev`: Build the module worker.\n  - Run `wrangler dev`\n  - Visit via `http://127.0.0.1:8787`\n  - Console logs are shown in the terminal\n- `test`: Run tests using `Jest`.\n  - Coverage report will be stored in `coverage` directory\n- `lint`: Run linting and testing using `ESLint`.\n  - Linting rules are stored in `.eslintrc.js`\n  - Files and directories in `.eslintignore` will be ignored\n- `format`: Format the source code using `prettier`.\n  - Rules are stored in `.prettierrc`\n\nIf you want to publish the module worker, you can use `wrangler publish`.\n\n### GitHub Action Auto Deploy\n\nProvide a `CF_API_TOKEN` secret to enable auto deploy.\n\nThe workflow is here: [publish_worker.yml](./.github/workflows/publish_worker.yml)\n\n## Notice\n\n### Don't Push to Main Branch\n\nPush to other branches and make a PR to the main branch, by doing so, the GitHub Action will check your PR is working before merging it.\n\nPush directly to the main branch will trigger a deploy process immediately without checking your the new code is working or not.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjacoblincool%2Fcloudflare-module-worker","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjacoblincool%2Fcloudflare-module-worker","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjacoblincool%2Fcloudflare-module-worker/lists"}