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

fix ServeCommand.py to use all expected host/port flags #473

Merged
merged 1 commit into from
Dec 31, 2021

Conversation

StevenMHernandez
Copy link
Contributor

Fixes #472

Before these changes, here are the three unique errors that were occuring:

  1. python craft serve -b 0.0.0.0 -p 12345 results in Serving on http://localhost:12321 (wrong)
  2. python craft serve --host 0.0.0.0 -p 12345 results in Serving on http://0.0.0.0:12321 (correct)
  3. python craft serve -b 0.0.0.0 --port 12345 results in ValueError: '--host' is not in list (wrong)
  4. python craft serve --host 0.0.0.0 --port 12345 results in ValueError: invalid literal for int() with base 10: '0.0.0.0' (wrong)

With my changes all three errors are fixed.

  1. python craft serve -b 0.0.0.0 -p 12345 results in Serving on http://0.0.0.0:12321 (correct)
  2. python craft serve --host 0.0.0.0 -p 12345 results in Serving on http://0.0.0.0:12321 (correct)
  3. python craft serve -b 0.0.0.0 --port 12345 results in Serving on http://0.0.0.0:12321 (correct)
  4. python craft serve --host 0.0.0.0 --port 12345 results in Serving on http://0.0.0.0:12321 (correct)

@josephmancuso josephmancuso merged commit 2394326 into MasoniteFramework:4.0 Dec 31, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Setting the hostname with python craft serve -b 0.0.0.0 does not work
2 participants