Skye
05/02/2023, 4:01 PMdkfdkdodkms
05/02/2023, 4:01 PMSkye
05/02/2023, 4:03 PMwrangler dev --local
- In pages dev, use --do MyBinding=MyWorkerScriptName@MyDOClassName
, then you can access your do namespace with context.env.MyBinding
And for production you just bind it in the dashboard to your DO namespacedkfdkdodkms
05/02/2023, 4:07 PMSkye
05/02/2023, 4:07 PMSkye
05/02/2023, 4:08 PM.pages.dev
domains (including preview deployments)dkfdkdodkms
05/02/2023, 4:08 PMSkye
05/02/2023, 4:08 PMSkye
05/02/2023, 4:09 PMdkfdkdodkms
05/02/2023, 4:12 PMHardAtWork
05/02/2023, 4:13 PMpackage.json
scripts, so that you don’t have to call it from memorydkfdkdodkms
05/02/2023, 4:17 PMdkfdkdodkms
05/02/2023, 4:18 PMdkfdkdodkms
05/02/2023, 4:18 PMHardAtWork
05/02/2023, 4:21 PMdkfdkdodkms
05/02/2023, 4:28 PMHardAtWork
05/02/2023, 4:33 PMHardAtWork
05/02/2023, 4:35 PMdkfdkdodkms
05/02/2023, 4:36 PMemvh
05/03/2023, 8:26 AMemvh
05/03/2023, 8:44 AMnpx wrangler pages dev public
mizchi
05/04/2023, 8:20 AM[vars]
in pages functions.
When I run wrangler pages dev ...
, I can access the variables declared in [vars]
as intended, but the workers in functions released with wrangler pages publish
seem to ignore the vars
in I have a feeling that vars
in wrangler.toml
is being ignored. The result of wrangler secret put xxx
is the same.
The released functions Objecte.keys(env)
run returns the following results, regardless of the original vars setting.
ASSETS, CF_PAGES, CF_PAGES_BRANCH, CF_PAGES_COMMIT_SHA, CF_PAGES_URL
Is this the intended behavior, or just a wrangler pages ...
is under development?HardAtWork
05/04/2023, 8:22 AMwrangler pages dev
reads your wrangler.toml
at all. All configuration should be passed via the CLI, or .dev.vars
for secrets.mizchi
05/04/2023, 8:26 AMwrangler secret put
didn't seem to work either. It's not a good way to do it, though, because if I miss reference it, I'll expose it to the client.HardAtWork
05/04/2023, 8:30 AMwrangler pages publish
only supports uploading a built project, not configuring it.zszszsz
05/06/2023, 12:59 AMnora
05/06/2023, 12:55 PMSkye
05/06/2023, 12:56 PMGigabyte
05/06/2023, 4:44 PMzszszsz
05/06/2023, 4:45 PM