D
D
dblearn942020-09-12 15:27:02
Node.js
dblearn94, 2020-09-12 15:27:02

Directory structure for middleware generators, objects?

There are many factories, middleware generators, etc., I want to clean up and structure.
These factories and generators are specific to the application as a whole, not to a specific module.

now the structure is:

- libs
- - errors 
- - helpers
- - utils (тут генераторы middlewares)
- - factories (тут фабрики)
- - builders (тут классы/функции которые относятся к паттерну строитель)
- modules
- middlewares (общие, например обработчик ошибок)


How to correctly name directories with factories, generators, middlewares, etc.? , now it's all in utils, but it's a mess, in my opinion there should be something else in utils, useful functions are common, etc., and not generating functions / classes

Why do I call the directory with errors, helpers, etc. libs ? All my life I thought there some libraries put the

project ready , long abandoned, I study and disassemble for the sake of practice and better understanding of how everything works.

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question