Private
Public Access
20 lines
520 B
Python
20 lines
520 B
Python
"""Startet die lokale Halloween-WebUI auf dem Pi oder im Demo-Modus."""
|
|
|
|
import argparse
|
|
|
|
import uvicorn
|
|
|
|
from halloween.web import create_app
|
|
|
|
|
|
def main():
|
|
parser = argparse.ArgumentParser(description=__doc__)
|
|
parser.add_argument("--demo", action="store_true", help="synthetisches Bild statt Pi-Kamera")
|
|
parser.add_argument("--port", type=int, default=8000)
|
|
args = parser.parse_args()
|
|
uvicorn.run(create_app(demo=args.demo), host="127.0.0.1", port=args.port)
|
|
|
|
|
|
if __name__ == "__main__":
|
|
main()
|