@@ -129,6 +129,7 @@ def check_static_img_folders():
129129
130130 return dir_path + '/images'
131131
132+ app = Flask (__name__ )
132133
133134def main (config_file , port , numProc , template_folder = None , debug = False ):
134135
@@ -140,14 +141,15 @@ def main(config_file, port, numProc, template_folder=None, debug=False):
140141 sys .stderr .write ("setting template folder to\n {}\n " .format (template_folder ))
141142 kwargs ['template_folder' ] = template_folder
142143
143- app = Flask (__name__ , ** kwargs )
144+ # app = Flask(__name__, **kwargs)
144145
145146 from flask import Blueprint
146147 img_path = check_static_img_folders ()
147148
148149 # register an static path for images using Blueprint
149150 images_static = Blueprint ('site' , __name__ ,
150151 static_url_path = '/images' ,
152+ template_folder = template_folder ,
151153 static_folder = img_path )
152154 app .register_blueprint (images_static )
153155
@@ -375,4 +377,15 @@ def get_image():
375377 return None
376378
377379 # run the app
378- app .run (host = '0.0.0.0' , debug = debug , use_reloader = False , port = port , processes = numProc )
380+ # app.run(host='0.0.0.0', debug=debug, use_reloader=False, port=port, processes=numProc)
381+
382+ main (config_file = '/data/browserConfig.ini' , port = 8080 , template_folder = None , numProc = 1 , debug = True , create_app = False )
383+
384+ if __name__ == "__main__" :
385+ # run the app
386+ app .run (host = '0.0.0.0' , debug = True , use_reloader = False , port = 8080 , processes = 2 )
387+
388+
389+
390+
391+
0 commit comments