philippgille / serve

serve starts a simple temporary static file server in your current directory and prints your IP address to share with colleagues
Mozilla Public License 2.0
153 stars 15 forks source link

Add possibility to bind to specific interface #19

Closed philippgille closed 5 years ago

philippgille commented 6 years ago

Currently serve always binds on 0.0.0.0, but maybe you only want the server to be reachable on a specific address, like localhost for temporary testing without exposing a directory to other network members.

A flag b would make sense for this.

Printint the network interface table probably doesn't make sense in this case, and the URL suggestion could simply be the chosen bind address + port.

A format check and proper message in case of a bad format should be added.