i am making an Doctor appointment App using MERN STACK and there i dr uploads video, for video i have used stream so video loads and server doesn't send entire length of video ,similarly now i have to load An Array objects data of notification from database there can be 2000k notification and more so i want as a person scrolls only it loads more 20 to 30 notification then as soon as a person get to the end of scroll again it loads 20 to 30 notifications , i am new to node js stream please guide me i also don't how would i give path to createReadStream if data comes from Database, Thank u in Advance i hope you understand my problem
i tried stream for video there i made uplads folder so just easily gave the path of file in createReadStream,and its working fine but when i tried to get data from an array i can't give the path of data base also don't have idea how to send An array of notification into small peaces