diff --git a/halfapi/cli/config.py b/halfapi/cli/config.py index 437aeeb..0d4befe 100644 --- a/halfapi/cli/config.py +++ b/halfapi/cli/config.py @@ -14,7 +14,6 @@ from ..conf import ( HOST, PORT, PRODUCTION, - BASE_DIR ) CONF_STR=f""" @@ -23,7 +22,6 @@ name = {PROJECT_NAME} host = {HOST} port = {PORT} production = {PRODUCTION} -base_dir = {BASE_DIR} [domains]""" diff --git a/halfapi/cli/run.py b/halfapi/cli/run.py index 3a24150..7598f67 100644 --- a/halfapi/cli/run.py +++ b/halfapi/cli/run.py @@ -2,6 +2,7 @@ """ cli/domain.py Defines the "halfapi run" cli command """ +import os import sys import click import uvicorn @@ -9,7 +10,7 @@ import uvicorn from .cli import cli from .domain import list_api_routes from ..conf import (PROJECT_NAME, HOST, PORT, - PRODUCTION, BASE_DIR, DOMAINSDICT) + PRODUCTION, DOMAINSDICT) @click.option('--host', default=None) @click.option('--port', default=None) @@ -32,7 +33,7 @@ def run(host, port): click.echo(f'Launching application {PROJECT_NAME}') - sys.path.insert(0, BASE_DIR) + sys.path.insert(0, os.getcwd()) list_api_routes()