- commit
- d9d896c11cb55addfc16f98ff76cda110fefec39
- parent
- c2e0215679247dca6527b7d338b6b03842c6b23c
- Author
- Tobias Bengfort <tobias.bengfort@posteo.de>
- Date
- 2023-09-16 13:47
allow to run on unix domain socket
Diffstat
| M | audiothek.py | 11 | ++++++++++- |
1 files changed, 10 insertions, 1 deletions
diff --git a/audiothek.py b/audiothek.py
@@ -1,3 +1,4 @@ -1 1 import argparse 1 2 import json 2 3 from xml.sax.saxutils import escape 3 4 @@ -112,6 +113,14 @@ async def feed(request): 112 113 113 114 114 115 if __name__ == '__main__': -1 116 parser = argparse.ArgumentParser(description=__doc__) -1 117 parser.add_argument('--port', type=int) -1 118 parser.add_argument('--path') -1 119 args = parser.parse_args() -1 120 115 121 app = web.Application() 116 122 app.router.add_route('GET', '/feed/{id}/', feed)117 -1 web.run_app(app, host='localhost', port=5000)-1 123 if args.path: -1 124 web.run_app(app, path=args.path) -1 125 else: -1 126 web.run_app(app, host='localhost', port=args.port)