Are bindings "secret"

Like I wouldn't push
"d1_databases": [
{
"binding": "DB",
"database_name": "database",
"database_id": "123",
},
],
"d1_databases": [
{
"binding": "DB",
"database_name": "database",
"database_id": "123",
},
],
to a public repo right? instead database_id should be stored as a variable somewhere right?
5 Replies
Need_Not
Need_NotOP5mo ago
However I accessing variables in the config doesn't seem possible
Hello, I’m Allie!
It’s fine to push to a public repo To use your DB, someone would need to have access to your account Just having the ID is not enough to connect
Need_Not
Need_NotOP5mo ago
I did figure that. But then what if someone wanted to run their own version of it. Does it cause problems if the dbs have the same id?
Hello, I’m Allie!
It just won’t deploy, they would need to create the DB and change the binding themselves Though IIRC the Deploy To Cloudflare button does that for you
Need_Not
Need_NotOP5mo ago
alright

Did you find this page helpful?