@@ -79,15 +79,10 @@ def initialize(self):
7979
8080if __name__ == "__main__" :
8181 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 )
8985 PYTHON_ENV = os .environ .get ("PYTHON_ENV" , default = "prod" ).strip ().lower ()
90- print (f"{ PYTHON_ENV = } " , flush = True )
9186 if PYTHON_ENV == "prod" :
9287 config .prod_config ()
9388 elif PYTHON_ENV == "dev" :
@@ -101,7 +96,6 @@ def initialize(self):
10196 args .port = os .environ .get ("PORT" )
10297 args .host = os .environ .get ("HOST" )
10398 DATA_FOLDER_PATH = os .environ .get ("DATA_FOLDER_PATH" )
104- print (f"{ DATA_FOLDER_PATH = } " , flush = True )
10599
106100 _Server .configure (args )
107101 server .start_webserver (options = args , protocol = _Server )
0 commit comments