O
O
OktaVa662016-03-03 21:30:16
Node.js
OktaVa66, 2016-03-03 21:30:16

Building a backend on Node.JS by analogy with the front?

Good time!
I encountered the node for the first time, and indeed with the backend. Looked at how Kantor does , did something similar. The result is a rather voluminous structure with routes, middlewares, models, and so on.
The question is: is it necessary to run the entire backend with a bundler (webpack or gulp) in order to minify and merge into one file, similar to the frontend? Maybe there will be some profit in the speed of work or some plugin will tell you about bottlenecks and problems in the code?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
K
Konstantin Kitmanov, 2016-03-04
@OktaVa66

To be honest, there will be a profit in loading speed - calling require leads to a fairly large number of accesses to the file system. But this is all once, when the application starts. Since node applications run once and run for a long time, this is a worthless and even harmful saving on matches.
Bottlenecks and problems are found by linter, as Alexey Ukolov rightly said , by unit tests, profiling.

A
Alexey Ukolov, 2016-03-03
@alexey-m-ukolov

It is not necessary, of course, you will not have to drive them over the network. And you can check it with a linter without collecting it.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question