Answer the question
In order to leave comments, you need to log in
How to correctly connect common methods in express?
It is inconvenient to connect modules via a relative path: ../../../module.
How to connect simply: module?
Answer the question
In order to leave comments, you need to log in
https://www.npmjs.com/package/module-alias
You can of course do something like this, but "Inconvenient" is solved by using an IDE with autocompletion, when you write something like let someVar = moduleFunction() in the code, it automatically adds import of the required module (and even a specific function if there are different exports in the module).
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question