"""Application entry point."""

{% if litestar_granian %}
from granian import Granian
from granian.constants import Interfaces
{% else %}
import uvicorn
{% endif %}

from config import settings


def main() -> None:
    """Run the application."""
{% if litestar_granian %}
    Granian(
        "app:app",
        address=settings.HOST,
        port=settings.PORT,
        interface=Interfaces.ASGI,
        reload=settings.DEBUG,
    ).serve()
{% else %}
    uvicorn.run(
        "app:app",
        host=settings.HOST,
        port=settings.PORT,
        reload=settings.DEBUG,
    )
{% endif %}


if __name__ == "__main__":
    main()
