Refactor: convert getRouteConfig to promise.