diff options
author | Keuin <[email protected]> | 2023-06-03 16:15:06 +0800 |
---|---|---|
committer | Keuin <[email protected]> | 2023-06-03 16:15:06 +0800 |
commit | e6c29a08b7fbbbd4533d635a51e71a8060ab9d48 (patch) | |
tree | 8d6670775f253f13f97ae3f94a567bda315e8e74 /web.py | |
parent | 8280adff0a4ebe5603162ba3d77aaed36c262075 (diff) |
Dockerize
Diffstat (limited to 'web.py')
-rw-r--r-- | web.py | 9 |
1 files changed, 7 insertions, 2 deletions
@@ -1,3 +1,4 @@ +import argparse import asyncio import os import re @@ -51,11 +52,15 @@ def setup_loop(): if __name__ == '__main__': + p = argparse.ArgumentParser(prog='utaten2tex') + p.add_argument('-l', '--host', default='127.0.0.1') + p.add_argument('-p', '--port', default='8080') + args = p.parse_args() setup_loop() uvicorn.run( 'web:app', - host='127.0.0.1', - port=8000, + host=args.host, + port=int(args.port), log_level='info', loop='none', # use custom loop initializer ) |