def get_app_file() -> Path:
    """Get the app file for the backend.

    Returns:
        The app file for the backend.

    Raises:
        ImportError: If the app module is not found.
    """
    current_working_dir = str(Path.cwd())
    if current_working_dir not in sys.path:
        # Add the current working directory to sys.path
        sys.path.insert(0, current_working_dir)
    module_spec = importlib.util.find_spec(get_app_module())
    if module_spec is None:
        msg = f"Module {get_app_module()} not found. Make sure the module is installed."
        raise ImportError(msg)
    file_name = module_spec.origin
    if file_name is None:
        msg = f"Module {get_app_module()} not found. Make sure the module is installed."
        raise ImportError(msg)
    return Path(file_name).resolve()
Get the app file for the backend.

    Returns:
        The app file for the backend.

    Raises:
        ImportError: If the app module is not found.
    
reflex/utils/exec.py