scottohara / loot

An implementation of some of the core MS Money features in Ruby on Rails
MIT License
4 stars 3 forks source link

heroku local default port 5000 in use on macOS Monterey #187

Closed scottohara closed 1 year ago

scottohara commented 2 years ago

By default heroku local uses port 5000 if the --port flag is not passed or ENV["PORT"] is not set.

Starting with macOS Monterey, a Control Center process (related to the AirPlay Receiver feature) grabs this port commonly used by many web development servers (e.g. Python Flask).

Ideally, it would be preferred if macOS changed what port AirPlay Receiver listens on in a future OS update, but the expectation of that happening is low.

Failing that, the next best preferred solution would be for a future version of node-foreman to choose a different default port. Given that node-foreman hasn't been touched in a number of years, and changing the default port would be a significant breaking change (and would impact users that aren't using Macs); again the expectation of this changing is low.

Another option is to simply turn off AirPlay Receiver as mentioned in the above linked Medium post; but that has to be done on every machine that development is done on (and obviously precludes using AirPlay Receiver as designed).

For now, we're left with having to explicitly pass --port 3000 to all heroku local commands (or create a .env file with PORT=3000), which is fine, but less than ideal.

scottohara commented 1 year ago

Can close this if/when we finalise move from Heroku to Fly.io