Next.js Discord

Discord Forum

Mongodb CRUID without open API

Unanswered
Bohemian Waxwing posted this in #help-forum
Open in Discord
Bohemian WaxwingOP
Hi, I forgot how to create CRUID using mongodb with private API. I should create /app/api correct?

5 Replies

It's upto you @Bohemian Waxwing
Only thing that matters is that it's in the app dir
And the filename is route.ts or route.js
How you want to structure the folders is upto you
So you can do a folder inside app called routes and have a route.ts inside it, this will make the url be /routes/