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
|
from ReverseProxied import ReverseProxied
|
||||||
import emission
|
import emission
|
||||||
data= JSONfile("chaine.json")
|
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)
|
app.wsgi_app = ReverseProxied(app.wsgi_app)
|
||||||
CORS(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'])
|
@app.route('/api/v1/ping', methods=['GET'])
|
||||||
def ping_pong():
|
def ping_pong():
|
||||||
|
@ -44,10 +44,10 @@ module.exports = {
|
|||||||
|
|
||||||
build: {
|
build: {
|
||||||
// Template for index.html
|
// Template for index.html
|
||||||
index: path.resolve(__dirname, '../../dist/index.html'),
|
index: path.resolve(__dirname, '../../backend/dist/index.html'),
|
||||||
|
|
||||||
// Paths
|
// Paths
|
||||||
assetsRoot: path.resolve(__dirname, '../../dist'),
|
assetsRoot: path.resolve(__dirname, '../../backend/dist'),
|
||||||
assetsSubDirectory: 'static',
|
assetsSubDirectory: 'static',
|
||||||
assetsPublicPath: '/chainetv/',
|
assetsPublicPath: '/chainetv/',
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user