const handler = createHandler();
handler.get(async (req, res) => {
var index = Number(req.query.start_index);
var page_size = Number(req.query.page_size);
console.log(index, page_size);
const posts = await Post.find({})
.populate("email")
.skip(index)
.limit(page_size);
res.status(200).json(posts);
});