Ben Akroyd
Ben Akroyd
CDCloudflare Developers
Created by Ben Akroyd on 2/14/2025 in #pages-help
Difficulty getting started with functions/_middleware.js
we have a rails backend, and have almost nothing in our server/ folder in the nuxt app. Some nuxt middleware, a few very rarely used routes, and an error plugin. But nearly all of our vue pages are built such that they should be rendered by the server when directly navigated to.
5 replies
CDCloudflare Developers
Created by Ben Akroyd on 2/14/2025 in #pages-help
Difficulty getting started with functions/_middleware.js
with npx wrangler pages deployment tail, i see static assets fly out, and the get requests for pages that are serverside rendered, but none of the logging, etc from functions/_middleware.js. the functions folder is the root of our project (not the output folder), as instructed by the docs.
5 replies
CDCloudflare Developers
Created by Ōita (Eric) on 8/2/2024 in #pages-help
Can't deploy middleware function | Qwik • Sentry
I'm also struggling a bit getting started with functions/middleware for a nuxt app. Following this. If I find anything helpful I will share. My questions: - we use wrangler pages deploy dist, as dist is set as the output folder (through a nitro 'cloudflare-pages' preset). I assume that functions/_middleware.js should go in out nuxt project root, not dist/ (to make dist/functions/_middleware.js) correct? - I have yet to see any feedback, anywhere, that our _middleware.js file is working, or erroring. If its working, and console.log statements are in the file, should we see them in instant logs? Should the Functions tab (as pictured above) be updated?
2 replies