-
Notifications
You must be signed in to change notification settings - Fork 91
feat: auto-generate wrangler bindings from hub config #716
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
@onmax is attempting to deploy a commit to the NuxtLabs Team on Vercel. A member of the Team first needs to authorize it. |
commit: |
41a8792 to
a47117a
Compare
a9e8e32 to
50fbbcf
Compare
RihanArfan
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we should prefix these ones to explicitly make them clear they're for Cloudflare now that NuxtHub is vendor agnostic. I think database is fine as it's within the connection block.
|
Not sure about your comment @RihanArfan as this is actually similar to how nitro storage works by merging all options. I am fine having: blob: {
driver: 'cloudflare-r2',
bucketName: 'BLOB'
} |
Closes #708
When binding IDs are provided in hub config, auto-generate wrangler bindings via
nitro.cloudflare.wrangler.driver: 'd1'+connection.databaseIdd1_databasesconnection.hyperdriveIdhyperdrivedriver: 'cloudflare-r2'+bucketNamer2_bucketsdriver: 'cloudflare-kv-binding'+namespaceIdkv_namespacesdriver: 'cloudflare-kv-binding'+namespaceIdkv_namespacesGreat DX improvement for Cloudflare - no need to manually sync
nuxt.configwithwrangler.toml.Missing
Documentation for this is at the moment missing. If we decide to move forward, I can update the docs marking this new methodology the "recommended" way to work with cloudflare. however, if you think this is not good enough, or you have other ideas planned, we can close this pr :)