Build router automatically