From be1e5ed72254ed2091f930445c0dff9ea620551e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jo=C3=ABl=20Ma=C3=AFzi?= Date: Tue, 28 Jul 2020 14:40:01 +0200 Subject: [PATCH] Fix some typos. --- halfapi/cli.py | 2 +- halfapi/conf.py | 4 ++-- halfapi/lib/routes.py | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/halfapi/cli.py b/halfapi/cli.py index aae92ab..3d020fa 100755 --- a/halfapi/cli.py +++ b/halfapi/cli.py @@ -41,7 +41,7 @@ def run(host, port): sys.path.insert(0, BASE_DIR) click.echo(f'current python_path : {sys.path}') - uvicorn.run('halfapi.app:app', + uvicorn.run('halfapi.app:application', host=host, port=int(port), log_level=log_level, diff --git a/halfapi/conf.py b/halfapi/conf.py index ad7d901..d0be08f 100644 --- a/halfapi/conf.py +++ b/halfapi/conf.py @@ -24,7 +24,7 @@ if len(PROJECT_NAME) == 0: raise Exception('Need a project name as argument') -CONF_DIR = environ.get('HALFAPI_CONF_DIR', '/etc/halfapi') +CONF_DIR = environ.get('HALFAPI_CONF_DIR', '/etc/half_api') config.read(filenames=[os.path.join( CONF_DIR, @@ -33,8 +33,8 @@ config.read(filenames=[os.path.join( HOST = config.get('project', 'host') PORT = config.getint('project', 'port') - DB_NAME = f'halfapi_{PROJECT_NAME}' + with open(config.get('project', 'secret')) as secret_file: SECRET = secret_file.read() diff --git a/halfapi/lib/routes.py b/halfapi/lib/routes.py index f60f006..b2a1db2 100644 --- a/halfapi/lib/routes.py +++ b/halfapi/lib/routes.py @@ -46,7 +46,7 @@ def get_routes(domains=None): return caller app_routes = [] - for domaine_name in DOMAINS: + for domain_name in DOMAINS: try: domain = next(Domain(name=domain_name).select()) except StopIteration: