Answer the question
In order to leave comments, you need to log in
How to use shared files in Node.js projects?
Good afternoon, there are two projects: a website and api for the application, I don’t want to combine them. How can I move the model files so that they can be used both there and there? If you take them out to a higher level of projects, the models swear on dependencies. there is no node_modules folder.
Answer the question
In order to leave comments, you need to log in
- src
-- app
-- server
The server can have access to the application files and include them, but not vice versa
The common folder is superfluous here IMHO
https://git-scm.com/book/ru/v1/%D0%98%D0%BD%D1%81%...
Take it
to a separate repo, connect it as a git submodule
PS You have seriously common business logic on the client and server?
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question