-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathrun.py
More file actions
35 lines (27 loc) · 720 Bytes
/
run.py
File metadata and controls
35 lines (27 loc) · 720 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
"""This is the main entry point for the web application, for development and testing.
See wsgi.py for the main entry point for production.
"""
import pathlib
import sys
import daiquiri
import uvicorn
BASE_PATH = pathlib.Path(__file__).resolve().parent
sys.path.append((BASE_PATH / 'webapp').as_posix())
import config
import fastapi_app
import main
daiquiri.setup(
level=config.Config.LOG_LEVEL,
outputs=(
daiquiri.output.File(config.Config.LOG_PATH),
'stdout',
),
)
if __name__ == "__main__":
uvicorn.run(
fastapi_app.app,
host='127.0.0.1',
port=5443,
ssl_keyfile=config.Config.TLS_KEY_PATH,
ssl_certfile=config.Config.TLS_CERT_PATH,
)