Skip to content

Latest commit

 

History

History
31 lines (20 loc) · 966 Bytes

README.md

File metadata and controls

31 lines (20 loc) · 966 Bytes

cloudflare-worker-jest-test

Starter template for Cloudflare Worker project using Typescript, Jest, Eslint, Prettier, Webpack, and of course, Wrangler cli.

This project has been generated using worker-typescript-template.

Getting started

  • Install the dependencies: yarn install
  • One of the dependency is the Cloudflare Worker cli called wrangler which is used to develop and publish the worker

Development

  • yarn dev will compile the ts files and open a preview of the worker in the browser (watch mode enabled)
  • Switch to the "Testing" tab to check the response status and headers

Test

yarn test

Publish

  • Add your accound and zone id in wrangler.toml
  • Login in Cloudflare using yarn login (short for yarn wrangler login)
  • Publish your changes:
yarn publish