@@ -128,6 +128,7 @@ def check_static_img_folders():
128128
129129 return dir_path + '/images'
130130
131+ app = Flask (__name__ )
131132
132133def main (config_file , port , numProc , template_folder = None , debug = False ):
133134
@@ -139,14 +140,15 @@ def main(config_file, port, numProc, template_folder=None, debug=False):
139140 sys .stderr .write ("setting template folder to\n {}\n " .format (template_folder ))
140141 kwargs ['template_folder' ] = template_folder
141142
142- app = Flask (__name__ , ** kwargs )
143+ # app = Flask(__name__, **kwargs)
143144
144145 from flask import Blueprint
145146 img_path = check_static_img_folders ()
146147
147148 # register an static path for images using Blueprint
148149 images_static = Blueprint ('site' , __name__ ,
149150 static_url_path = '/images' ,
151+ template_folder = template_folder ,
150152 static_folder = img_path )
151153 app .register_blueprint (images_static )
152154
@@ -372,4 +374,15 @@ def get_image():
372374 return None
373375
374376 # run the app
375- app .run (host = '0.0.0.0' , debug = debug , use_reloader = False , port = port , processes = numProc )
377+ # app.run(host='0.0.0.0', debug=debug, use_reloader=False, port=port, processes=numProc)
378+
379+ main (config_file = '/data/browserConfig.ini' , port = 8080 , template_folder = None , numProc = 1 , debug = True , create_app = False )
380+
381+ if __name__ == "__main__" :
382+ # run the app
383+ app .run (host = '0.0.0.0' , debug = True , use_reloader = False , port = 8080 , processes = 2 )
384+
385+
386+
387+
388+
0 commit comments