Closed benguild closed 1 year ago
Thanks for looking into this! I find setting up env variables much easier and straightforward, specifically when doing local development and deploying without using Wranger. I'd say a better solution would be supporting both but giving a higher priority to secrets
so it is used if set. Otherwise, we default back to env variables.
Happy to implement it tomorrow morning!
It's just a README change. Deploying a secret with the same name works the same way but doesn't store it in the file, which risks it being accidentally committed to the repo.
I apologize! You are right!
Two things before I merge,
We still need [env.production]
in the toml file. I currently get this warning:
- No environment found in configuration with name "production".
Before using `--env=production` there should be an equivalent environment section in
the configuration.
Consider adding an environment configuration section to the wrangler.toml file:
[env.production]
Also, I think this would be a better description for the third step:
Use the command
npx wranler secret put --env production TOKEN
to create a secure token. You are then prompted to enter a random secret value. This will be used to authenticate your requests. You can also set this value directly in your Cloudflare dashboard.
I'll tweak it right now, hang on
pushed 26aa4bcc2f0514f06221fcefe2a1c24cd854d5ca
Merged! Thank you.
1