changed production check environment
parent
b5c42cd95d
commit
8b07805ab7
|
|
@ -6,19 +6,12 @@ import codecs
|
|||
import glob
|
||||
import os
|
||||
|
||||
production = True if os.environ.get('NODE_ENV','') == 'production' else False
|
||||
production = False if os.environ.get('NODE_ENV','') == 'development' else True
|
||||
xmlDir = 'public/' if production else 'build/'
|
||||
# from flask_cors import CORS, cross_origin
|
||||
# CORS(app)
|
||||
|
||||
# @app.route('/')
|
||||
# def walle_index():
|
||||
# return app.send_static_file('index.html')
|
||||
|
||||
|
||||
# @app.route('/api/test')
|
||||
# def walle_test():
|
||||
# return "test"
|
||||
@app.route('/')
|
||||
def walle_index():
|
||||
return app.send_static_file('index.html')
|
||||
|
||||
@app.route('/api/morph')
|
||||
def walle_morph():
|
||||
|
|
@ -42,6 +35,9 @@ def walle_xmlfiles():
|
|||
xml_files = map(os.path.basename,glob.glob(xmlDir+'*.xml'))
|
||||
return json.dumps(xml_files)
|
||||
|
||||
# from flask_cors import CORS, cross_origin
|
||||
# CORS(app)
|
||||
|
||||
# hmr streaming
|
||||
# import requests
|
||||
# from flask import Response,stream_with_context
|
||||
|
|
|
|||
Loading…
Reference in New Issue