Or Pages functions but yeah if you use

Or Pages functions, but yeah, if you use the adapter correctly.
13 Replies
Unknown User
Unknown User17mo ago
Message Not Public
Sign In & Join Server To View
itsmatteomanf
itsmatteomanf17mo ago
It doesn't need to be in the functions folder. But if you need it to be available at build time, it needs to be deployed somewhere already.
itsmatteomanf
itsmatteomanf17mo ago
Astro Documentation
@astrojs/cloudflare
Learn how to use the @astrojs/cloudflare SSR adapter to deploy your Astro project.
itsmatteomanf
itsmatteomanf17mo ago
This is the same as you have in Workers.
Unknown User
Unknown User17mo ago
Message Not Public
Sign In & Join Server To View
itsmatteomanf
itsmatteomanf17mo ago
Unfortunately not, but the runtime is the same object you get in the main function of the function or the worker. Personally, I'd just log them and you'd see all the objects on that.
Unknown User
Unknown User17mo ago
Message Not Public
Sign In & Join Server To View
itsmatteomanf
itsmatteomanf17mo ago
You need to run the wrangler cli pages commands with the astro dev command.
Unknown User
Unknown User17mo ago
Message Not Public
Sign In & Join Server To View
itsmatteomanf
itsmatteomanf17mo ago
It will use the default, I'd personally pass through an actual db because I'm not sure if local even works on pages dev. You need to pass through them via the cli (I so want a config file!) You need to do the former.
Unknown User
Unknown User17mo ago
Message Not Public
Sign In & Join Server To View
itsmatteomanf
itsmatteomanf17mo ago
Bindings · Cloudflare Pages docs
A binding enables your Pages Functions to interact with resources on the Cloudflare developer platform. Use bindings to integrate your Pages Functions …
Want results from more Discord servers?
Add your server