configure mongodb and router