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