3 ms·
Here's an example with SvelteKit[1]. You can put a middleware.ts (or.js) in the root folder of any framework and it will work. We also have examples for using E
by leerob 4y ago
Here's an example with SvelteKit[1]. You can put a middleware.ts (or.js) in the root folder of any framework and it will work. We also have examples for using Edge API Routes, which work with any framework[2].
[1]: https://github.com/vercel/examples/pull/320 https://github.com/vercel/examples/pull/320
[2]: https://github.com/vercel/examples/tree/main/edge-api-routes https://github.com/vercel/examples/tree/main/edge-api-routes