Determines the port from the env, argv or a default