Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/jrf0110/cf-workers-boilerplate
Cloudflare workers TypeScript boilerplate
https://github.com/jrf0110/cf-workers-boilerplate
boilerplate cloudflare cloudflare-workers typescript webpack
Last synced: 2 months ago
JSON representation
Cloudflare workers TypeScript boilerplate
- Host: GitHub
- URL: https://github.com/jrf0110/cf-workers-boilerplate
- Owner: jrf0110
- Created: 2019-05-31T15:52:43.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2023-01-03T23:13:11.000Z (about 2 years ago)
- Last Synced: 2024-04-14T14:46:12.357Z (9 months ago)
- Topics: boilerplate, cloudflare, cloudflare-workers, typescript, webpack
- Language: JavaScript
- Homepage:
- Size: 1.67 MB
- Stars: 13
- Watchers: 3
- Forks: 1
- Open Issues: 15
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
> __Warning!__ This is real old
# Cloudflare Workers Boilerplate
![Cloudflare workers autocompletion](./docs/screen-1.png)
**Features**
- Strict TypeScript
- Webpack bundling
- Multiple worker targets
- Workers preview
- Testing
- Routing with async middleware example
- Error pages
- CI with Circle![Error page](./docs/screen-2.png)
**Coming soon**
- Preact + Edge-side rendering bundle
- Deployment
- KV Examples
- Web Assembly with Wrangler### Getting started
Clone the repository and run:
```bash
# Install deps
yarn
# Build everything
yarn build
# Preview the api build
yarn preview:api
```**Incremental builds and tests**
```bash
yarn build:watch & yarn test:watch
```## Targets
This project is setup so that one may build multiple Service Worker targets
### Target: API
This targets demonstrates how one would create an HTTP API with Cloudflare Workers
### Target: Tests
Any file that ends with `_test.ts` or `_test.tsx` will be run through