mrvwman
mrvwman
CDCloudflare Developers
Created by Razkif on 8/8/2024 in #pages-help
Pages + Functions or Pages + Worker (How to dev full-stack locally)
And this was where I learned to configure the tunnel with a fixed hostname: https://developers.cloudflare.com/cloudflare-one/connections/connect-networks/configure-tunnels/local-management/
8 replies
CDCloudflare Developers
Created by Razkif on 8/8/2024 in #pages-help
Pages + Functions or Pages + Worker (How to dev full-stack locally)
I don't have a local wrangler.toml, I'm just using the ability to configure things via the dashboard. I found the page here https://developers.cloudflare.com/pages/functions/local-development/ that led me to the "npx wrangler pages dev ." command.
8 replies
CDCloudflare Developers
Created by mrvwman on 8/8/2024 in #pages-help
Is there a way to get an exact copy of what fetch sends?
I figured this out. I setup a cloudflare tunnel to a port on my machine and then used netcat to dump whatever comes in. Then I used that cloudflare tunnel endpoint as the host for my fetch request. This let me see exactly what cloudflare was sending.
2 replies
CDCloudflare Developers
Created by Razkif on 8/8/2024 in #pages-help
Pages + Functions or Pages + Worker (How to dev full-stack locally)
Yes, I use a functions directory.
8 replies
CDCloudflare Developers
Created by Razkif on 8/8/2024 in #pages-help
Pages + Functions or Pages + Worker (How to dev full-stack locally)
Personally I use wrangler for local dev and cloudflare tunnels to make it available on an https domain. npx wrangler pages dev . --compatibility-flags="nodejs_compat" That makes the directory your in served up as a pages project on localhost:8788 Then I have a tunnel that points to my local machine's port 8788 I start it like this: cloudflared tunnel run <ID of your tunnel> Then you can hit your pages via the hostname you configured in your tunnel. eg: https://subdomain-devel.example.com and that gets routed to your localhost:8788 which is being served by wrangler. Hope that helps
8 replies