lane711 / sonicjs

SonicJs Headless CMS - Blazing Fast Headless CMS built on Cloudflare Workers. 100% Javascript Based
https://sonicjs.com
912 stars 117 forks source link

Update Environment Variables Documentation #240

Closed ninjasitm closed 8 months ago

ninjasitm commented 8 months ago

Firstly, thank you for this! Secondly, I'm new to Cloudflare pages deployment and have previously only really used Netlify and Github Pages.

I spent the better part of 4 hours trying to figure out why my wrangler.toml configuration was not updating in production in order to have proper R2 storage and file uploads working. I finally found that I needed to update the Worker > Settings > Functions section in order to add the right R2 bindings.

I would recommend updating the environment variables section to state this or adding a separate Bindings section in the documentation to state where and how to update the following:

lane711 commented 8 months ago

Thanks for calling this out and sorry you got stuck on this due to the gap in documentation.

We added R2 integration just last week and I had not yet updated the docs.

I've updated the docs here to include R2: https://sonicjs.com/deploy

I've also updated the example wrangler.toml here: https://github.com/lane711/sonicjs/blob/main/wrangler.example.toml