Where can I run nodejs backend code in my nextjs app so it knows it is backend and not frontend js.
Unanswered
Dwarf Crocodile posted this in #help-forum
Dwarf CrocodileOP
I've googled and gpt'ed it but seems no easy answer. I know I could make a route. but that was not what i was thinking I was thinking a directory with alot of functions thats purely nodejs.
3 Replies
Dwarf CrocodileOP
Thanks but more if the is a place where the code is backend.. Maybe similar.. Like I have my utils but that is frontendjs. Correct me if I am wrong. 🙂
Well, if your utils are never used in frontend code then it wont be shipped to the frontend either.
Im not sure if this is what you are looking for but its worth looking into.
(Private folders)
https://nextjs.org/docs/app/building-your-application/routing/colocation#private-folders
Im not sure if this is what you are looking for but its worth looking into.
(Private folders)
https://nextjs.org/docs/app/building-your-application/routing/colocation#private-folders