Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

use default host/port when serving #61

Open
cs01 opened this issue May 2, 2019 · 4 comments

Comments

2 participants
@cs01
Copy link
Contributor

commented May 2, 2019

Make CLI API more friendly such that it defaults to using localhost:8000 if no host/port is specified.

@kernc

This comment has been minimized.

Copy link
Contributor

commented May 2, 2019

When only colon is provided (--http :), the defaults are used.

There's no way to make the parameter to --http optional. I.e. how can Python (argparse) know "foo" is not a host/port specification?

pdoc --http foo bar
@cs01

This comment has been minimized.

Copy link
Contributor Author

commented May 2, 2019

The cli would have to either add commands such as pdoc build PACKAGE, pdoc serve PACKAGE or change the meaning of --http to be action=store_true and add another optional parameter --url.

Personally I like pdoc build and pdoc serve.

@kernc

This comment has been minimized.

Copy link
Contributor

commented May 2, 2019

But you certainly don't like --http : that you only really type out once? 🙂

@cs01

This comment has been minimized.

Copy link
Contributor Author

commented May 2, 2019

I am sure I am getting a little annoying by now 😄 but it's only because I really like pdoc!

A default should be something one doesn't have to type. Otherwise it's not really a default, even if it is only one character. For that matter why not type the whole url out just once?

Separating into different commands makes sense because the build/serve operations are completely different, and would work nicely if something else is ever added such as pdoc publish.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.