Use mongoose to persist message history to a mongodb instance