Skip to content

Commit

Permalink
fix: db config
Browse files Browse the repository at this point in the history
  • Loading branch information
jeff committed Oct 12, 2024
1 parent 05429fc commit bdf760a
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/views/helloworld/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ const data = ref<string>("");
onMounted(async () => {
const response = await fetch(`/api/hello-world`);
data.value = await response.text();
// await fetch(`/api/user/detail?id=1`);
});
</script>

Expand Down
5 changes: 5 additions & 0 deletions wrangler.toml
Original file line number Diff line number Diff line change
@@ -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"

0 comments on commit bdf760a

Please sign in to comment.