Below is a sample program in NodeJS which pulls data from a data file and make sure each buffer is a single line in that data file and finally prints each line.