Use createReadStream to send the requested part to the client. The function call createReadStream() will give you a readable stream.
Example
The following is the code −
stream = fs.createReadStream(path);
stream.on('open', function () {
res.writeHead(206,{
"Content-Range":"bytes " + begin + "-" + end + "/" +total, "Accept-Ranges":"bytes",
"Content-Length":chunksize, "Content-Type":"new/mp4"
});
stream.pipe(res);
});