joeyespo / grip

Preview GitHub README.md files locally before committing them.
MIT License
6.46k stars 424 forks source link

support for port 0 #195

Closed jwilk closed 8 years ago

jwilk commented 8 years ago

I want to run multiple instances of grip at the same time. Manually selecting port every time is tedious, so I thought I'll let my OS choose it for me by using port 0.

This works very well through API:

$ python -c 'from grip import serve; serve(port=0)'
 * Running on http://localhost:35739/ (Press CTRL+C to quit)

But it doesn't work on the command-line:

$ grip . 0
 * Running on http://0:6419/ (Press CTRL+C to quit)

(Um, no, that's not what I wanted! :unamused:)

$ grip . localhost:0
Error: Invalid address 'localhost:0'
 * Running on http://localhost:6419/ (Press CTRL+C to quit)

(Still not what I wanted…)

joeyespo commented 8 years ago

Didn't know about this! Very cool. Fixed in #196.

joeyespo commented 8 years ago

Thanks for the issue, @jwilk!

joeyespo commented 8 years ago

FYI this was released with v4.3.1.