diff --git a/src/views/helloworld/index.vue b/src/views/helloworld/index.vue index 58a3e8f..178defa 100644 --- a/src/views/helloworld/index.vue +++ b/src/views/helloworld/index.vue @@ -6,6 +6,7 @@ const data = ref(""); onMounted(async () => { const response = await fetch(`/api/hello-world`); data.value = await response.text(); + // await fetch(`/api/user/detail?id=1`); }); diff --git a/wrangler.toml b/wrangler.toml index 48f4bd0..3859da8 100644 --- a/wrangler.toml +++ b/wrangler.toml @@ -1,3 +1,8 @@ name = "cloudflare-pages-demo" compatibility_date = "2024-09-09" main = "app/server.ts" + +[[d1_databases]] +binding = "DB" # This is the variable name you'll use in your code +database_name = "demo" +database_id = "test"