Update demo command to open demo.reflex.run (#2059)
This commit is contained in:
parent
6b7bd8e51b
commit
bb77d14fbc
@ -7,6 +7,7 @@ import os
|
|||||||
import shutil
|
import shutil
|
||||||
import tempfile
|
import tempfile
|
||||||
import time
|
import time
|
||||||
|
import webbrowser
|
||||||
from datetime import datetime
|
from datetime import datetime
|
||||||
from pathlib import Path
|
from pathlib import Path
|
||||||
from typing import List, Optional
|
from typing import List, Optional
|
||||||
@ -714,18 +715,22 @@ def demo(
|
|||||||
backend_port: str = typer.Option("8001", help="Specify a different backend port."),
|
backend_port: str = typer.Option("8001", help="Specify a different backend port."),
|
||||||
):
|
):
|
||||||
"""Run the demo app."""
|
"""Run the demo app."""
|
||||||
with tempfile.TemporaryDirectory() as tmp_dir:
|
# Open the demo app in a terminal.
|
||||||
os.chdir(tmp_dir)
|
webbrowser.open("https://demo.reflex.run")
|
||||||
_init(
|
|
||||||
name="reflex_demo",
|
# Later: open the demo app locally.
|
||||||
template=constants.Templates.Kind.DEMO,
|
# with tempfile.TemporaryDirectory() as tmp_dir:
|
||||||
loglevel=constants.LogLevel.ERROR,
|
# os.chdir(tmp_dir)
|
||||||
)
|
# _init(
|
||||||
_run(
|
# name="reflex_demo",
|
||||||
frontend_port=frontend_port,
|
# template=constants.Templates.Kind.DEMO,
|
||||||
backend_port=backend_port,
|
# loglevel=constants.LogLevel.DEBUG,
|
||||||
loglevel=constants.LogLevel.ERROR,
|
# )
|
||||||
)
|
# _run(
|
||||||
|
# frontend_port=frontend_port,
|
||||||
|
# backend_port=backend_port,
|
||||||
|
# loglevel=constants.LogLevel.DEBUG,
|
||||||
|
# )
|
||||||
|
|
||||||
|
|
||||||
deployments_cli = typer.Typer()
|
deployments_cli = typer.Typer()
|
||||||
|
@ -878,9 +878,7 @@ def check_requirements_for_non_reflex_packages() -> bool:
|
|||||||
return False
|
return False
|
||||||
|
|
||||||
|
|
||||||
def authenticate_on_browser(
|
def authenticate_on_browser(invitation_code: str) -> str:
|
||||||
invitation_code: str,
|
|
||||||
) -> str:
|
|
||||||
"""Open the browser to authenticate the user.
|
"""Open the browser to authenticate the user.
|
||||||
|
|
||||||
Args:
|
Args:
|
||||||
|
Loading…
Reference in New Issue
Block a user