about summary refs log tree commit diff
diff options
context:
space:
mode:
authorUltraQbik <no1skill@yandex.ru>2024-08-27 20:41:58 +0300
committerUltraQbik <no1skill@yandex.ru>2024-08-27 20:41:58 +0300
commit72d94d4dd0464a80146dd08bcee33291a8e4be2e (patch)
tree0300e1e2a42670a761e5cba570b05dc1b23b765f
parent71c618908bd31c0d76469d26252159308c053ea9 (diff)
downloadhttpy-72d94d4dd0464a80146dd08bcee33291a8e4be2e.tar.gz
httpy-72d94d4dd0464a80146dd08bcee33291a8e4be2e.zip
Update parser
-rw-r--r--main.py13
1 files changed, 7 insertions, 6 deletions
diff --git a/main.py b/main.py
index d707570..60680c4 100644
--- a/main.py
+++ b/main.py
@@ -27,6 +27,7 @@ _parser = argparse.ArgumentParser(
         description="https web server")
 _parser.add_argument("-p", "--port",
                      help="binding port (default 13700)",
+                     type=int,
                      default=13700)
 _parser.add_argument("-c", "--cert",
                      help="certificate (or fullchain.pem)",
@@ -34,17 +35,17 @@ _parser.add_argument("-c", "--cert",
 _parser.add_argument("-k", "--priv-key",
                      help="private key",
                      required=True)
-_parser.add_argument("--disable-ssl",
-                     help="SSL for HTTPs encrypted connection (default True)",
-                     default=True,
-                     action="store_true")
 _parser.add_argument("--dont-compress-path",
                      help="disables pre-compression of files in 'www' folder (default True)",
-                     default=True,
+                     default=False,
                      action="store_true")
-_parser.add_argument("--compress-path",
+_parser.add_argument("--compressed-path",
                      help="path where compressed directory will be stored (default 'compress')",
                      default="compress")
+_parser.add_argument("--disable-ssl",
+                     help="SSL for HTTPs encrypted connection (default True)",
+                     default=True,
+                     action="store_true")
 ARGS = _parser.parse_args()
 
 # logging