@@ -79,15 +79,10 @@ def initialize(self):
79
79
80
80
if __name__ == "__main__" :
81
81
basedir = os .path .abspath (os .path .dirname (__file__ ))
82
- print (f"{ basedir = } " , flush = True )
83
- if os .path .isfile (os .path .join (basedir , "../../.env" )):
84
- print ("Loading .env file" , flush = True )
85
- print (f"{ basedir = } " , flush = True )
86
- dotenv .load_dotenv (os .path .join (basedir , "../../.env" ))
87
- else :
88
- print ("No .env file found" , flush = True )
82
+ dot_env_path = os .path .join (basedir , "../../.env" )
83
+ if os .path .isfile (dot_env_path ):
84
+ dotenv .load_dotenv (dot_env_path )
89
85
PYTHON_ENV = os .environ .get ("PYTHON_ENV" , default = "prod" ).strip ().lower ()
90
- print (f"{ PYTHON_ENV = } " , flush = True )
91
86
if PYTHON_ENV == "prod" :
92
87
config .prod_config ()
93
88
elif PYTHON_ENV == "dev" :
@@ -101,7 +96,6 @@ def initialize(self):
101
96
args .port = os .environ .get ("PORT" )
102
97
args .host = os .environ .get ("HOST" )
103
98
DATA_FOLDER_PATH = os .environ .get ("DATA_FOLDER_PATH" )
104
- print (f"{ DATA_FOLDER_PATH = } " , flush = True )
105
99
106
100
_Server .configure (args )
107
101
server .start_webserver (options = args , protocol = _Server )
0 commit comments