Next.js Discord

Discord Forum

In NextJS pages, what is considered frontend and what is backend?

Unanswered
American black bear posted this in #help-forum
Open in Discord
American black bearOP
I have a project using pages (not app yet), and I need to use config files, interfaces, enums and consts on both frontend and backend, and would love to share them on both ends.
Where do I need to put them in my project to make this work, keeping best practices?
Currently it is located in "src/shared" dir, but I'm not sure it is best practice. Is it ok to put there .ts & .json files? Will it be weird IYO?

0 Replies