Erisa | Support Engineer
12/18/2021, 11:06 PMSkye
12/18/2021, 11:33 PMSkye
12/18/2021, 11:34 PMErisa | Support Engineer
12/19/2021, 12:18 AMGreg Brimble | Cloudflare Pages
12/19/2021, 12:25 AMGreg Brimble | Cloudflare Pages
12/19/2021, 12:25 AMWalshy | Pages
12/19/2021, 12:18 PMrichardwong
12/19/2021, 12:23 PMStew
12/19/2021, 12:26 PMStew
12/19/2021, 12:28 PMWalshy | Pages
12/19/2021, 12:30 PMStew
12/19/2021, 12:37 PMtaro
12/21/2021, 7:41 PMwrangler pages dev
instances?taro
12/21/2021, 7:43 PMwrangler@alpha
and wrangler pages dev <STATIC_FOLDER> -o COUNTER=Counter
taro
12/21/2021, 7:44 PM-o COUNTER=Counter@example-worker-script-name
taro
12/21/2021, 7:45 PMwrangler publish <WORKER_SCRIPT_FILE_PATH>
and test the worker as expectedtaro
12/21/2021, 7:46 PMGreg Brimble | Cloudflare Pages
12/21/2021, 8:28 PMwrangler@pages
is a WIP on external durable objects support.Greg Brimble | Cloudflare Pages
12/21/2021, 8:28 PMtaro
12/21/2021, 8:32 PMwrangler@pages
is required, wrangler@alpha
is incompatible with DOs as of this moment (in the dev env)taro
12/21/2021, 8:32 PMwrangler@pages
version im using is 0.0.0-6e68a3b
taro
12/21/2021, 8:53 PMfunctions
and DOs they fetch
from. For example, I have a function at functions/api/counter
which passes untouched/original requests to a Counter
DO. That DO is just a quick copy-paste of the Counter
example from the DO docs, which only responds with anything of substance to requests at the "root" level, e.g. /increment
. Since this is the case, if I make a call to my pages app at /api/counter/increment
, I have to properly slice the request's path before passing it to the DO (the DO doesn't handle anything at /api/...
). Of course, there are a handful of ways to address this (DOs can handle entire/absolute paths vs. relative, absolute paths can be made relative, etc.), but they all roughly have the same drawback of maintaining similar/duplicate route matching within both functions
and DOs; i.e. I have to maintain two instances of route matching/handling in order to fully serve requests to /api/counter/increment
taro
12/21/2021, 8:54 PMtaro
12/21/2021, 8:56 PMgeelen
12/21/2021, 9:26 PMfilename.durable.ts
scheme that automatically get bundled up into a DO, I suppose that could work for file-based routing...geelen
12/21/2021, 9:27 PMenv.MY_OBJECT.increment()
instead of .fetch
geelen
12/21/2021, 9:28 PMrichardwong
12/22/2021, 5:05 AMHardAtWork
12/22/2021, 5:06 AM