gets posts from mongo