adding logic for dev-prod port and api url discrepencies