const { createReadStream } = require('fs');
const { resolve } = require('path');
app.get('/stream', (req, res) => {
const readStream = createReadStream(resolve(__dirname, 'ypurFilePath'));
readStream.on('open', function () {
readStream.pipe(res);
});
readStream.on('error', res.end(err));
res.on('close', readStream.close());
res.on('error', readStream.close());
});
{field:{$gte: 6}, field:{$lte: 8}}
{$and:[{field:{$gte: 6}}, {field:{$lte: 8}}]}