mirror of
https://github.com/syumai/workers.git
synced 2025-03-11 01:39:11 +00:00
30 lines
572 B
Markdown
30 lines
572 B
Markdown
![]() |
# multiple-handlers
|
||
|
|
||
|
* This example shows how to use multiple handlers in a single worker.
|
||
|
|
||
|
## Development
|
||
|
|
||
|
### Requirements
|
||
|
|
||
|
This project requires these tools to be installed globally.
|
||
|
|
||
|
* wrangler
|
||
|
* tinygo
|
||
|
|
||
|
### Commands
|
||
|
|
||
|
```
|
||
|
make dev # run dev server
|
||
|
make build # build Go Wasm binary
|
||
|
make deploy # deploy worker
|
||
|
```
|
||
|
|
||
|
#### Testing cron schedule
|
||
|
|
||
|
* With curl command below, you can test the cron schedule.
|
||
|
- see: https://developers.cloudflare.com/workers/runtime-apis/handlers/scheduled/#background
|
||
|
|
||
|
```
|
||
|
curl "http://localhost:8787/__scheduled?cron=*+*+*+*+*"
|
||
|
```
|