working online D1 tutorial

This commit is contained in:
polv committed 2026-08-30 19:15:59 +07:00
1 parent 1079a1a481
commit 91623834d6
5 files changed
+50 -36

No files matched your search

+17 -12
View File
@@ -9,28 +9,33 @@
"compatibility_date": "2026-08-25",
"migrations": [
{
"new_sqlite_classes": [
"MyDurableObject"
],
"tag": "v1"
}
"new_sqlite_classes": ["MyDurableObject"],
"tag": "v1",
},
],
"assets": {
// The path to the directory containing the `index.html` file to be served at `/`
"directory": "./public"
"directory": "./public",
},
"durable_objects": {
"bindings": [
{
"class_name": "MyDurableObject",
"name": "MY_DURABLE_OBJECT"
}
]
"name": "MY_DURABLE_OBJECT",
},
],
},
"observability": {
"enabled": true
"enabled": true,
},
"upload_source_maps": true
"upload_source_maps": true,
"d1_databases": [
{
"binding": "prod_d1_tutorial",
"database_name": "prod-d1-tutorial",
"database_id": "1e595d69-ec95-4eef-a2ef-57ac6ada1973",
},
],
/**
* Smart Placement
* https://developers.cloudflare.com/workers/configuration/smart-placement/#smart-placement
@@ -54,4 +59,4 @@
* https://developers.cloudflare.com/workers/wrangler/configuration/#service-bindings
*/
// "services": [ { "binding": "MY_SERVICE", "service": "my-service" } ]
}
}