Created by: sotojuan
Work in progress!
Fixes #85 (closed).
The idea is to detect if port 3000 is used by something else and if so, use a different port.
portfinder
takes in a basePort
and returns that if it's available. If not, it'll use the next available port. This was a good solution because we can use 3000 as the basePort
.
The problem is that while I can pass the port
to the function that opens the browser, I can't pass it to the function that logs The app is running at http://localhost:3000/
.
Assuming this UX is fine (@gaearon wanted a prompt, but I feel like this is less intrusive), how can I let the logging functions know about the new port?
Thanks!