diff --git a/halfapi/cli/run.py b/halfapi/cli/run.py index 7045d94..cbc7cb7 100644 --- a/halfapi/cli/run.py +++ b/halfapi/cli/run.py @@ -33,7 +33,7 @@ def run(host, port, reload): reload = False raise Exception('Can\'t use live code reload in production') - log_level = 'info' if PRODUCTION else LOGLEVEL + log_level = LOGLEVEL or 'info' click.echo(f'Launching application {PROJECT_NAME}') @@ -41,6 +41,13 @@ def run(host, port, reload): list_api_routes() + click.echo(f'uvicorn.run("halfapi.app:application"\n' \ + f'host: {host}\n' \ + f'port: {port}\n' \ + f'log_level: {log_level}\n' \ + f'reload: {reload}\n' + ) + uvicorn.run('halfapi.app:application', host=host, port=int(port),