mirror of
https://github.com/michivonah/themepark-assistant.git
synced 2025-12-22 22:16:29 +01:00
implement cron router + install cloudflare types
This commit is contained in:
parent
dfadc64afa
commit
3f9547f014
5 changed files with 7509 additions and 1 deletions
22
README.md
22
README.md
|
|
@ -14,4 +14,26 @@ DB scheme is defined in typescript
|
|||
apply changes
|
||||
```bash
|
||||
npx drizzle-kit push
|
||||
```
|
||||
|
||||
## Cloudflare workers tricks
|
||||
If types are missing, run:
|
||||
```bash
|
||||
npx wrangler types
|
||||
```
|
||||
|
||||
## Testing cronjobs
|
||||
Run worker locally (without remote d1 access)
|
||||
```bash
|
||||
npx wrangler dev --test-scheduled
|
||||
```
|
||||
|
||||
Run worker locally (with remote connection to d1)
|
||||
```bash
|
||||
npx wrangler dev --remote --test-scheduled
|
||||
```
|
||||
|
||||
Run curl request with cron expression
|
||||
```bash
|
||||
curl "http://localhost:8787/__scheduled?cron=*+*+*+*+*"
|
||||
```
|
||||
Loading…
Add table
Add a link
Reference in a new issue