zszszsz
04/23/2023, 10:03 PMzszszsz
04/23/2023, 10:04 PMzszszsz
04/23/2023, 10:05 PMzszszsz
04/23/2023, 10:10 PMzszszsz
04/23/2023, 10:43 PMwrangler pages dev
running, the number becomes larger.zszszsz
04/23/2023, 10:44 PMnpx wrangler pages dev ./dist
and nothing more.zszszsz
04/23/2023, 10:46 PMzszszsz
04/23/2023, 10:49 PMzszszsz
04/23/2023, 10:50 PMLarry
04/24/2023, 3:28 AMwrangler pages dev
Gradyent
04/24/2023, 1:12 PMSkye
04/24/2023, 1:14 PMrobinmetral
04/25/2023, 9:16 PMBenSeitz
04/26/2023, 4:50 PMwrangler pages dev ./public --d1=DB_BINDING --persist
This creates a .wrangler/state/d1/DB_BINDING.sqlite3
file.
I replaced that with the backup.
I don't know if there's a shortcut somehow...robinmetral
04/26/2023, 9:49 PMwrangler d1 execute <command>
and interface directly with the local SQLite file.robinmetral
04/26/2023, 9:52 PMwrangler d1 execute --local <command>
will work if the binding is defined in wrangler.toml. So that is also kind of working for me. I'll update https://community.cloudflare.com/t/working-with-d1-and-cloudflare-pages-in-local-development/501863 with details!spacey
04/27/2023, 2:14 AMspacey
04/27/2023, 2:24 AMnpx wrangler kv:key list
with this local kv store?spacey
04/27/2023, 6:23 AMvendettabass
04/27/2023, 7:35 AMResponse
, not a file) to json in a worker / function?HardAtWork
04/27/2023, 7:41 AMvendettabass
04/27/2023, 8:35 AMHardAtWork
04/27/2023, 8:36 AMvendettabass
04/27/2023, 8:37 AMvendettabass
04/27/2023, 8:39 AM/functions
still work if I switch out to using _worker.js
?Walshy | Pages
04/27/2023, 8:40 AMvendettabass
04/27/2023, 8:43 AMsilentdevnull
04/27/2023, 9:30 PMexport async function onRequest(context) {
const options = {
limit: 500,
include: ['customMetadata'],
};
const obj = await context.env.NAME.list(options);
if (obj === null) {
return new Response('Not found', { status: 404 });
}
return new Response(obj.body);
}
This is my first time trying to do R2 through code so I could be something simple I'm missing.kian
04/27/2023, 9:30 PMbody
is for GET
kian
04/27/2023, 9:30 PM