def run(
    env: LITERAL_ENV,
    frontend_only: bool,
    backend_only: bool,
    frontend_port: int | None,
    backend_port: int | None,
    backend_host: str | None,
):
    """Run the app in the current directory."""
    if frontend_only and backend_only:
        console.error("Cannot use both --frontend-only and --backend-only options.")
        raise click.exceptions.Exit(1)

    config = get_config()

    frontend_port = frontend_port or config.frontend_port
    backend_port = backend_port or config.backend_port
    backend_host = backend_host or config.backend_host

    environment.REFLEX_COMPILE_CONTEXT.set(constants.CompileContext.RUN)
    environment.REFLEX_BACKEND_ONLY.set(backend_only)
    environment.REFLEX_FRONTEND_ONLY.set(frontend_only)

    _run(
        constants.Env.DEV if env == constants.Env.DEV else constants.Env.PROD,
        frontend_only,
        backend_only,
        frontend_port,
        backend_port,
        backend_host,
    )
Run the app in the current directory.
reflex/reflex.py