Answer the question
In order to leave comments, you need to log in
Where is the best and most competent way to place a file that connects to the database?
Good morning!
I have a problem... I don't know where it would be more correct to place the file that connects to the meringue data.
The directory structure is as follows:
-src
--middleware
---errorHandler.js
---routes.js
--models
--- Тут модели для подключения и выполнения операций CRUD c определенными таблицами.
--modules
---auth
----auth.js (тут роуты "/auth", который импортируется в routes.js)
---user
----user.js (тут роуты "/users", который импортируется в routes.js)
---car
----car.js (тут роуты "/cars", который импортируется в routes.js)
--services
--index.js (app.js)
--config.js (файл конфигурации)
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question