//Pagination
//page=2,limit=10
let page = req.query.page * 1 || 1;
let limit = req.query.limit * 1 || 100;
let skip = (page - 1) * limit;
query = query.skip(skip).limit(limit);
if (req.query.page) {
const numTours = await Tour.countDocuments();
if (skip >= numTours) throw new Error('This page does not exists');
}