Skip to content

Commit

Permalink
functions: Make the db available in prod
Browse files Browse the repository at this point in the history
a miss config πŸ˜…
  • Loading branch information
naveen521kk committed Nov 4, 2023
1 parent 9c71d48 commit 211d20c
Showing 1 changed file with 9 additions and 5 deletions.
14 changes: 9 additions & 5 deletions functions/wrangler.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,15 @@ vars = { ENVIRONMENT = "staging" }
[env.production]
vars = { ENVIRONMENT = "production" }

[[d1_databases]]
binding = "DB" # i.e. available in your Worker on env.DB
database_name = "main-website-api"
database_id = "c8bb7d86-947c-4a47-a84b-e77bcc72aa79"

[[env.production.d1_databases]]
binding = "DB" # i.e. available in your Worker on env.DB
database_name = "main-website-api"
database_id = "c8bb7d86-947c-4a47-a84b-e77bcc72aa79"

# Variable bindings. These are arbitrary, plaintext strings (similar to environment variables)
# Note: Use secrets to store sensitive data.
Expand Down Expand Up @@ -60,8 +69,3 @@ vars = { ENVIRONMENT = "production" }
# [[migrations]]
# tag = "v1"
# new_classes = ["MyDurableObject"]

[[d1_databases]]
binding = "DB" # i.e. available in your Worker on env.DB
database_name = "main-website-api"
database_id = "c8bb7d86-947c-4a47-a84b-e77bcc72aa79"

0 comments on commit 211d20c

Please sign in to comment.