refactoring server and route setup into config files