Closed rorticus closed 7 years ago
@rorticus do you think we should try and select another port if the port is taken? rather than erroring? or beyond scope?
@matt-gadd feels like that's a little beyond scope. I like the idea a lot though.
I don't really see what this adds over the existing default EADDRINUSE
error message . However if we add in something smarter to select another port from a specified range then that would add value.
Erroring only if none of them are available
Well, it should be pretty easy to add. I can go ahead and upgrade this PR to do that if you want!
@agubler @matt-gadd Added the port searching stuff. By default it will use 9999:9990
, but you can also specify,
# search only on port 123
--port=123
#search ports 9999, 9998, 9997, 9996
--port=9999:9996
#search ports 123, 456, 789
--port=123,456,789
@agubler actually i'm pretty sure my styles aren't set up right 😄 I'll be setting rules going forwards so hopefully the silly errors go away.
Also, I made all the changes you requested!
Fixed 😄
@rorticus can you add a little bit to the readme?
@agubler Updated the README
Type: feature
The following has been addressed in the PR:
Description:
Adding an error message if you try to start the dev server and the port is in use. Note that this is not specifically checking if the watch command is already running, just that the specified port is available.
Resolves #86