changed production check environment

master
Malar Kannan 2017-08-01 16:59:53 +05:30
parent b5c42cd95d
commit 8b07805ab7
2 changed files with 7 additions and 11 deletions

View File

View File

@ -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