Middleware.tsx
Answered
Varun posted this in #help-forum
![Avatar](https://cdn.discordapp.com/avatars/358369077208678412/46ec5d2bd1a5d64fa9aa579bf0e4b156.webp?size=256)
VarunOP
I don't see a middleware.tsx created in my project and generally I read that it is supposed to be on the same level as the pages folder. Would the equivalent of my pages folder be app?
![Image](https://cdn.discordapp.com/attachments/1190755259052740739/1190755259270832148/image.png?ex=65a2f440&is=65907f40&hm=a2f280bb332826d96e5a42aa64e16ff16f0d8d91f230c8bae74ab0df60193afa&)
3 Replies
![Avatar](https://cdn.discordapp.com/avatars/743561772069421169/3c5d689eee4459a24fc420063411c016.webp?size=256)
Ray
it should be at the root of directory
/middleware.ts
Answer
![Avatar](https://cdn.discordapp.com/avatars/743561772069421169/3c5d689eee4459a24fc420063411c016.webp?size=256)
Ray
or
src/middleware.ts
if you are using src folder![Avatar](https://cdn.discordapp.com/avatars/358369077208678412/46ec5d2bd1a5d64fa9aa579bf0e4b156.webp?size=256)
VarunOP
thanks!