-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathwrangler.example.toml
More file actions
41 lines (35 loc) · 1.58 KB
/
wrangler.example.toml
File metadata and controls
41 lines (35 loc) · 1.58 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
#:schema node_modules/wrangler/config-schema.json
name = "<your-worker-name>"
main = "src/index.js"
compatibility_date = "2024-12-30"
compatibility_flags = ["nodejs_compat"]
# Configuration variables
[vars]
KEEP_REPORTS = 1000 # defines how many reports should be kept in the database PER TABLE
# Triggers to invoke the scheduled() handler for cleaning up the D1 database
# Docs: https://developers.cloudflare.com/workers/configuration/cron-triggers
[triggers]
crons = [ "0 0 * * *" ]
# Workers Logs
# Docs: https://developers.cloudflare.com/workers/observability/logs/workers-logs/
# Configuration: https://developers.cloudflare.com/workers/observability/logs/workers-logs/#enable-workers-logs
[observability]
enabled = true
# Variable bindings. These are arbitrary, plaintext strings (similar to environment variables)
# Docs:
# - https://developers.cloudflare.com/workers/wrangler/configuration/#environment-variables
# Note: Use secrets to store sensitive data.
# - https://developers.cloudflare.com/workers/configuration/secrets/
# [vars]
# MY_VARIABLE = "production_value"
# Bind a D1 database. D1 is Cloudflare’s native serverless SQL database.
# Docs: https://developers.cloudflare.com/workers/wrangler/configuration/#d1-databases
[[d1_databases]]
binding = "D1_REPORTS"
database_name = "<your-d1-name>"
database_id = "<your-d1-id>"
# Bind a KV Namespace. Use KV as persistent storage for small key-value pairs.
# Docs: https://developers.cloudflare.com/workers/wrangler/configuration/#kv-namespaces
# [[kv_namespaces]]
# binding = "MY_KV_NAMESPACE"
# id = "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"