S
S
serg_nik2017-11-14 18:04:12
Node.js
serg_nik, 2017-11-14 18:04:12

How to load the server less when running nodejs web-app?

There is a 200KB-500KB text file, the contents of this file will be processed by several nodejs modules on the server.
Question: which is better, read the file once and pass its contents from module to module for manipulation, or read / write the file in each module?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
deemaagog, 2017-11-14
@deemaagog

you can create a stream and pass it through pipe()
https://nodejs.org/api/stream.html

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question