Is there a way to specify route priority with serverHandlers?
I'm working on an app where a user can upload a static website in a zip file on a
ex:
simplified nuxt example: https://stackblitz.com/edit/github-zkvqu3?file=nuxt.config.ts,pages%2Fupload.vue,file_server%2Findex.ts
This works as expected in just a plain nitro app.
simplified nitro example: https://stackblitz.com/edit/github-arwvdz?file=nitro.config.ts,routes%2Fupload.get.ts,file_server%2Findex.ts
/upload route, then the server will extract the site and host it on the root path /. ex:
- user visits
http://example.com/index.htmlthey should see the index.html file in their zip file - user visits
http://example.com/uploadand they should see my upload form
~/file_server/index.ts that I've registered on serverHandlers on a /* path, but it looks like that overrides any routes in pages/simplified nuxt example: https://stackblitz.com/edit/github-zkvqu3?file=nuxt.config.ts,pages%2Fupload.vue,file_server%2Findex.ts
This works as expected in just a plain nitro app.
simplified nitro example: https://stackblitz.com/edit/github-arwvdz?file=nitro.config.ts,routes%2Fupload.get.ts,file_server%2Findex.ts
StackBlitz
Create a new Nuxt project, module, layer or start from a theme with our collection of starters.
StackBlitz
Run official live example code for Nitro Hello World, created by Unjs on StackBlitz