from flask import Flask,render_template from flask_cors import CORS #from ReverseProxied import ReverseProxied def create_app(app_name=__name__): app=Flask(__name__, static_folder= "../dist/static",template_folder="../dist") app.config.from_object('chainetv.config.BaseConfig') #app.wsgi_app = ReverseProxied(app.wsgi_app) CORS(app) from chainetv.api import api app.register_blueprint(api, url_prefix="/api/v1") @app.route('/') @app.route('/') def index(path): return render_template('index.html') return app ##@app.errorhandler(404) ##def ma_page_404(error): ## return redirect("https://www.ducamps.win/404/404.html", 307)