Use environ to get the port