added ability to change port per endpoint type