Example files missing, referenced in folder structure docs.

From https://create.t3.gg/en/folder-structure#srcpagesapi
src/pages/api The api folder contains all the API routes of the Next.js application. The examples.ts file contains an example of a route that uses the Next.js API route feature along with Prisma. The restricted.ts file contains an example of a route that uses the Next.js API route feature and is protected by NextAuth.js.
When I look through the actual folder structure of a newly scaffolded app I don't see either. Were they removed and just not updated in docs? Are those examples contained elsewhere in the structure now?
6 Replies
c
cOP•2y ago
(thanks for putting all of this together, it's been v helpful so far!)
cje
cje•2y ago
yea we removed these recently and forgot to update docs. thanks for spotting this 🙂 the reason we removed them is because if you want to build a backend within next we would strongly suggest trpc so we didnt even want to show vanilla next anymore
reymon359
reymon359•2y ago
Hey guys, I noticed this too. What is then the approach to have restricted areas of the app for logged-in users?
reymon359
reymon359•2y ago
Also there are other files missing such as prettier.config.cjs. Why is so?
cje
cje•2y ago
prettier.config.cjs should be there when you select tailwind use getServerAuthSession in getServerSideProps and redirect for API routes use protectedProcedure
reymon359
reymon359•2y ago
Cool, Will check them out. Thanks!
Want results from more Discord servers?
Add your server