refactored api server's host and port information