def run_granian_backend(host: str, port: int, loglevel: LogLevel):
    """Run the backend in development mode using Granian.

    Args:
        host: The app host
        port: The app port
        loglevel: The log level.
    """
    console.debug("Using Granian for backend")

    if environment.REFLEX_STRICT_HOT_RELOAD.get():
        import multiprocessing

        multiprocessing.set_start_method("spawn", force=True)

    from granian.constants import Interfaces
    from granian.log import LogLevels
    from granian.server import MPServer as Granian

    Granian(
        target=get_app_instance_from_file(),
        factory=True,
        address=host,
        port=port,
        interface=Interfaces.ASGI,
        log_level=LogLevels(loglevel.value),
        reload=True,
        reload_paths=get_reload_paths(),
        reload_ignore_worker_failure=True,
        reload_ignore_patterns=HOTRELOAD_IGNORE_PATTERNS,
        reload_tick=100,
        workers_kill_timeout=2,
    ).serve()
Run the backend in development mode using Granian.

    Args:
        host: The app host
        port: The app port
        loglevel: The log level.
    
reflex/utils/exec.py