#Cloudflare Page Functions - No route

3 messages · Page 1 of 1 (latest)

scarlet anvil
#

Hey all,

I've followed the docs and examples from (https://docs.astro.build/en/guides/deploy/cloudflare/#using-pages-functions and https://developers.cloudflare.com/pages/framework-guides/deploy-an-astro-site/) and have a cloudflare-enabled astro site deployed.

However, when I add the root level functions directory (along with a single endpoint) and try to call the endpoint (from index.astro) I'm getting 500 server errors. I'm assuming it's because there's no entry in the generated _routes.json file:

_routes.json
{
  "version": 1,
  "include": [
    "/",
    "/_image"
  ],
  "exclude": []
}

Any ideas?

Repo: https://github.com/serdar/my-astro-app
Cloudflare page: https://my-astro-project.pages.dev/

GitHub

Contribute to serdar/my-astro-app development by creating an account on GitHub.

Docs

How to deploy your Astro site to the web using Cloudflare Pages.

upbeat dust
#

Did you happen to resolve this @scarlet anvil ? What does your set-up look like? I added one route as a CF Function and can't seem to get my Astro Pages project and that CF Function to interact (nothing but 404s). Very confused as to how I am meant to get these running.

autumn mural