Starter Template for Cloudflare Workers with GitHub Actions CI and Automatic Releases
- Semantic Release with Gitmoji
- Automatic publishing with wrangler-action
- Linting with Eslint
- Automatic Dependabot PR merging
- Write code in Typescript
- Comes with Mocha tests
- Based on Cloudflare's Workers template
- Create a new repository from this template
- Clone your new repository
- Install dependencies using
npm install
- Update package details in
package.json
andREADME.md
- Find and replace
betahuhn/cf-worker-starter
withuser/repository
- Find and replace
@betahuhn/cf-worker-starter
with projects npm name
- Find and replace
- Create a repository secret called
CF_API_TOKEN
to use the wrangler-action - Specify your worker details in the
wrangler.toml
file (more info in Cloudflare's Docs)
- run
yarn lint
ornpm run lint
to run eslint. - run
yarn test
ornpm run test
to run all Mocha tests. - run
yarn dev
ornpm run dev
to run the Worker locally with Wrangler. - run
yarn build
ornpm run build
to produce a production version with webpack.
This project was developed by me (@betahuhn) in my free time. If you want to support me:
Copyright 2021 Maximilian Schiller
This project is licensed under the MIT License - see the LICENSE file for details.