|
@@ -4,9 +4,9 @@ import os
|
|
|
|
|
|
config = configparser.ConfigParser()
|
|
|
|
|
|
-if os.environ.get('APP_ENV') == 'development' or os.environ.get('APP_ENV', '') =='':
|
|
|
+if os.environ.get('APP_ENV', 'development') == 'development':
|
|
|
config.readfp(open('development.ini'))
|
|
|
-else:
|
|
|
+elif os.environ.get('APP_ENV') == 'production':
|
|
|
config.readfp(open('production.ini'))
|
|
|
|
|
|
print(config.get('DATABASE', 'host'))
|