From 104130df6b1eb8fe20ed90357527092de1863a49 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=8F=B6=E5=AD=90?= Date: Sun, 12 Feb 2023 09:06:07 +0800 Subject: [PATCH] Fix pc export use backend url (#504) --- pynecone/pc.py | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/pynecone/pc.py b/pynecone/pc.py index 1f3eda3ec..139115c4a 100644 --- a/pynecone/pc.py +++ b/pynecone/pc.py @@ -158,11 +158,17 @@ def export( backend: bool = typer.Option( True, "--frontend-only", help="Export only frontend.", show_default=False ), + for_pc_deploy: bool = typer.Option( + False, + "--for-pc-deploy", + help="Whether export the app for Pynecone Deploy Service.", + ), ): """Export the app to a zip file.""" - # Get the app config. - config = utils.get_config() - config.api_url = utils.get_production_backend_url() + if for_pc_deploy: + # Get the app config and modify the api_url base on username and app_name. + config = utils.get_config() + config.api_url = utils.get_production_backend_url() # Compile the app in production mode and export it. utils.console.rule("[bold]Compiling production app and preparing for export.")