notifier/server.py

19 lines
407 B
Python
Raw Normal View History

2024-02-03 15:36:33 +00:00
from granian.constants import Interfaces
from granian.server import Granian
2023-11-23 22:58:55 +00:00
from settings import PORT
2024-02-16 23:56:15 +00:00
2024-02-18 07:47:07 +00:00
if __name__ == "__main__":
print("[server] started")
2024-02-04 05:03:29 +00:00
granian_instance = Granian(
2024-02-18 07:47:07 +00:00
"main:app",
address="0.0.0.0", # noqa S104
2024-02-04 05:03:29 +00:00
port=PORT,
workers=2,
threads=2,
websockets=False,
interface=Interfaces.ASGI,
)
granian_instance.serve()