Closed kevinz917 closed 3 years ago
Looks good from going over the code, the only things I see that need to change are the the log level in the worker got turned to trace and the webpack.config.js
changed to point locally got committed, so I'd revert those 2.
I'm curious addition of the vc
crate's URL
type to the worker, do all links in VCs need to be updated like that?
Also, I saw code that was roughly:
let res = await fetch(...);
let dataStr = await res.text();
let data = JSON.parse(dataStr);
and there's a nice helper for that case:
let res = await fetch(...);
let data = await res.json();
You can only call a res.body
consuming function once though, so .text()
after .json()
(or calling any combination of them after the first) will err out, so there times it's still helpful to JSON.parse
afterwards when you want the string too. Not anything that has to change, but res.json()
is nice to know about.
Deploying with Cloudflare Pages
0f14153
View logs