reverse the initialization order of cli and http