[cli][conf] suppression of BASE_DIR option (now defaults to os.getcwd)

This commit is contained in:
Maxime Alves LIRMM 2020-10-07 15:48:48 +02:00
parent cb5724b4fa
commit 710d390b49
2 changed files with 3 additions and 4 deletions

View File

@ -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]"""

View File

@ -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()