A
A
Abc Edc2015-06-08 14:28:45
Programming
Abc Edc, 2015-06-08 14:28:45

What is the correct way to connect modules for node js?

So that all modules (whether controllers or models) are connected dynamically, as in php. That is, depending on the request. Or so that everyone gathers at startup?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
_
_ _, 2015-06-08
@gleber1

"Or so that everything is assembled at startup"
In the node, lazy loading of libraries is not practiced, as far as I know.
In PHP, this is a necessary measure, because there is most often FastCGI, one request per process at a time, the process is initialized from scratch each time (let's skip dancing with the cache and so on for now).
And the server on the node is long-lived, so there is no problem to spend three seconds at startup to download everything and everything.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question