add mongoose and change index to server