uses waitOn function in the Router.configure