implement vuex et authent #2

Merged
vincent merged 8 commits from dev into master 2019-05-08 16:13:07 +00:00
9 changed files with 8 additions and 8 deletions
Showing only changes of commit dc61708d46 - Show all commits

View File

View File

@ -1,11 +1,10 @@
from flask import Blueprint, jsonify, request,make_response,redirect,url_for,render_template from flask import Blueprint, jsonify, request,make_response,redirect,url_for,render_template
from Jsonfile import JSONfile from chainetv.Jsonfile import JSONfile
import emission from chainetv import emission
data= JSONfile("chaine.json") data= JSONfile("chaine.json")
api = Blueprint("api", __name__) api = Blueprint("api", __name__)
@api.route('/ping', methods=['GET']) @api.route('/ping', methods=['GET'])
def ping_pong(): def ping_pong():
return jsonify('pong!') return jsonify('pong!')

View File

@ -1,12 +1,13 @@
from flask import Flask,render_template from flask import Flask,render_template
from flask_cors import CORS from flask_cors import CORS
from api import api
#from ReverseProxied import ReverseProxied #from ReverseProxied import ReverseProxied
def create_app(app_name=__name__): def create_app(app_name=__name__):
app=Flask(__name__, static_folder= "./dist/static",template_folder="./dist") app=Flask(__name__, static_folder= "./dist/static",template_folder="./dist")
app.config.from_object('config.BaseConfig') app.config.from_object('chainetv.config.BaseConfig')
#app.wsgi_app = ReverseProxied(app.wsgi_app) #app.wsgi_app = ReverseProxied(app.wsgi_app)
CORS(app) CORS(app)
from chainetv.api import api
app.register_blueprint(api, url_prefix="/api/v1") app.register_blueprint(api, url_prefix="/api/v1")
@app.route('/<path:path>') @app.route('/<path:path>')
def index(path): def index(path):

View File

@ -1,4 +1,4 @@
if __name__ == '__main__': if __name__ == '__main__':
from app import create_app from chainetv.app import create_app
app= create_app() app= create_app()
app.run() app.run()