serve index.html with gunicorn
This commit is contained in:
parent
2f92c13b04
commit
cc2d92e53a
@ -4,10 +4,14 @@ from Jsonfile import JSONfile
|
||||
from ReverseProxied import ReverseProxied
|
||||
import emission
|
||||
data= JSONfile("chaine.json")
|
||||
app=Flask(__name__,static_folder = "dist/static",template_folder="dist")
|
||||
app=Flask(__name__,static_folder = "./dist/static",template_folder="./dist")
|
||||
app.wsgi_app = ReverseProxied(app.wsgi_app)
|
||||
CORS(app)
|
||||
|
||||
@app.route('/', defaults={'path': ''})
|
||||
@app.route('/<path:path>')
|
||||
def index(path):
|
||||
return render_template('index.html')
|
||||
|
||||
@app.route('/api/v1/ping', methods=['GET'])
|
||||
def ping_pong():
|
||||
|
@ -44,10 +44,10 @@ module.exports = {
|
||||
|
||||
build: {
|
||||
// Template for index.html
|
||||
index: path.resolve(__dirname, '../../dist/index.html'),
|
||||
index: path.resolve(__dirname, '../../backend/dist/index.html'),
|
||||
|
||||
// Paths
|
||||
assetsRoot: path.resolve(__dirname, '../../dist'),
|
||||
assetsRoot: path.resolve(__dirname, '../../backend/dist'),
|
||||
assetsSubDirectory: 'static',
|
||||
assetsPublicPath: '/chainetv/',
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user