7
I have a very large file to import data to Mongodb via Javascript. The problem is that I cannot load the entire file into memory.
I would like to read this file line by line, since each line is a record to be entered in my database. I know the Fs library also works with stream, but it only searches for predefined byte sizes, without worrying whether the line is over or not. Someone’s already done it?
Excellent option @Zuul, thank you very much. Solved exactly the problem, mainly by the api having the nextLine method that solved the problem once and for all. Reputation++
– Rômulo O. Torres