move routes and api to config folder