scothis / serv

Serve static HTTP requests from any directory, ad hoc
MIT License
24 stars 8 forks source link

increment port on EADDRINUSE #5

Closed sstur closed 9 years ago

sstur commented 9 years ago

This adds a fallback when we can't listen on the specified TCP port. Increment the port number by one and try again.

scothis commented 9 years ago

I like the direction. I'd tend to fail hard if the user specified a port that was busy. That's to say we should only look for an open port if the default value is used. Thoughts?

sstur commented 9 years ago

Actually, I agree that will provide more expected behavior. PR update incoming..

sstur commented 9 years ago

I added a commit to update package.json contributers.