add code to start the server
This commit is contained in:
@@ -0,0 +1,21 @@
|
||||
from my_modules.app.logger import logger
|
||||
|
||||
from dotenv import find_dotenv, load_dotenv, dotenv_values
|
||||
from pathlib import Path
|
||||
import os, asyncio
|
||||
|
||||
async def read_dot_file():
|
||||
if load_dotenv(find_dotenv()):
|
||||
dot_env_file = find_dotenv()
|
||||
await logger.info(f'Found dotenv File: {dot_env_file}')
|
||||
await logger.info(f'Loaded Content: {dict(dotenv_values(dot_env_file))}')
|
||||
|
||||
asyncio.run(read_dot_file())
|
||||
|
||||
WEB_DEBUG = os.getenv("WEB_DEBUG", False)
|
||||
|
||||
SECRET_KEY = os.getenv("FLASK_SECRET_KEY", "USE_ENV_das_ist_ein_geheimer_schlüssel_1")
|
||||
API_GROUP = os.getenv("API_GROUP", 'PICOSHARE')
|
||||
|
||||
UPLOAD_DIR = Path("uploads")
|
||||
UPLOAD_DIR.mkdir(parents=True, exist_ok=True)
|
||||
Reference in New Issue
Block a user