Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/Thesephi/oak-routing-ctrl-cloudflare-worker
Template to develop a Cloudflare Workers app
https://github.com/Thesephi/oak-routing-ctrl-cloudflare-worker
api cloudflare-workers oak oak-routing-ctrl scaffold
Last synced: about 12 hours ago
JSON representation
Template to develop a Cloudflare Workers app
- Host: GitHub
- URL: https://github.com/Thesephi/oak-routing-ctrl-cloudflare-worker
- Owner: Thesephi
- License: mit
- Created: 2024-06-17T21:31:48.000Z (5 months ago)
- Default Branch: main
- Last Pushed: 2024-07-16T20:50:26.000Z (4 months ago)
- Last Synced: 2024-08-04T01:11:38.663Z (3 months ago)
- Topics: api, cloudflare-workers, oak, oak-routing-ctrl, scaffold
- Language: TypeScript
- Homepage: https://oak-routing-ctrl-cloudflare.dklab.workers.dev/swagger
- Size: 57.6 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# oak-routing-ctrl-cloudflare-worker
Starter template to develop a Cloudflare Worker application with `@oak/oak` and `@dklab/oak-routing-ctrl`.
Read more:
- [Oakserver](https://oakserver.org/)
- [oak-routing-ctrl](https://jsr.io/@dklab/oak-routing-ctrl)
- [Cloudflare Workers](https://workers.cloudflare.com/)# How to use this template
This template contains only a minimal set of files needed to develop & deploy a Cloudflare Workers application. You're welcome to use it in whichever way you like, e.g. copying all the
files, or selected files to mix & match as per your project needs.**Pro-tip**: the fastest way to clone this template to your local machine is to execute:
```bash
npm create oak-cloudflare-worker@latest
```# Example Deployment
A deployment is available for demo at the following URL: https://oak-routing-ctrl-cloudflare.dklab.workers.dev/swagger
```bash
curl \
-H"x-foo: lorem" \
-H"x-bar: ipsum" \
-H"Content-Type: application/json" \
https://oak-routing-ctrl-cloudflare.dklab.workers.dev/echo/world\?name=dolor -d'{"raz":"maz"}'
```
```
# output
{"query":{"name":"dolor"},"body":{"raz":"maz"},"param":{"name":"world"}}
```Please keep in mind that there's no uptime guarantee for the deployment above, so it might be unavailable from time to time due to exceeding traffic allowances.