add a newlink endpoint and set up mongo