Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/denis-avakov/worker-typescript-template

Minimal starter for building a new Cloudflare Workers project πŸ¦•
https://github.com/denis-avakov/worker-typescript-template

boilerplate cloudflare-worker cloudlfare esbuild eslint hono miniflare template typescript vitest workers

Last synced: 13 days ago
JSON representation

Minimal starter for building a new Cloudflare Workers project πŸ¦•

Awesome Lists containing this project

README

        

# `worker-typescript-template` πŸ¦•

This is a minimal starter for building a new Cloudflare Workers project that uses TypeScript, Hono, Miniflare, esbuild and Vitest. Use this boilerplate to build your new best thing γƒΎ(ΰΉ‘β•Ήβ—‘β•Ή)οΎ‰"

[![Maintainability](https://api.codeclimate.com/v1/badges/3fa5244eb03be0aa2681/maintainability)](https://codeclimate.com/github/denis-avakov/worker-typescript-template/maintainability) [![Test Coverage](https://api.codeclimate.com/v1/badges/3fa5244eb03be0aa2681/test_coverage)](https://codeclimate.com/github/denis-avakov/worker-typescript-template/test_coverage) [![Test](https://github.com/denis-avakov/worker-typescript-template/actions/workflows/test.yml/badge.svg)](https://github.com/denis-avakov/worker-typescript-template/actions/workflows/test.yml)

## How to use

1. Rename the `wrangler.example.toml` to `wrangler.toml` and populate the variables
2. Run `pnpm run dev` in your terminal to start a development server
3. Open a browser at `http://127.0.0.1:8787/` to see your worker in action
4. Make HTTP requests to `/cdn-cgi/mf/scheduled` to trigger scheduled events

## Lern more

- [Cloudflare Workers](https://developers.cloudflare.com/workers)
- [Miniflare](https://miniflare.dev)
- [Hono](https://honojs.dev)

## CLI

```cli
# Install dependencies
$ pnpm install

# Start local development server with live reload
$ pnpm run dev

# Start remote development server using wrangler
$ pnpm run dev:remote

# Run tests
$ pnpm run test

# Run coverage test report
$ pnpm run coverage

# Deploy using wrangler
$ pnpm run deploy
```