mirror of
https://github.com/Xevion/the-office.git
synced 2025-12-14 22:13:17 -06:00
fix vue npm build configuration, make flask render dist folder
This commit is contained in:
@@ -1,4 +1,4 @@
|
|||||||
module.exports = {
|
module.exports = {
|
||||||
indexPath: '../../dist/index.html',
|
outputDir: '../dist/',
|
||||||
assetsDir: '../../dist',
|
assetsDir: './static',
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ create_app.py
|
|||||||
The create_app function used to create and initialize the app with all of it's extensions and settings.
|
The create_app function used to create and initialize the app with all of it's extensions and settings.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
from flask import Flask
|
from flask import Flask, render_template
|
||||||
from flask_cors import CORS
|
from flask_cors import CORS
|
||||||
from flask_wtf.csrf import CSRFProtect
|
from flask_wtf.csrf import CSRFProtect
|
||||||
|
|
||||||
@@ -18,7 +18,10 @@ def create_app(env=None):
|
|||||||
"""
|
"""
|
||||||
The create_app function used to create and initialize the app with all of it's extensions and settings.
|
The create_app function used to create and initialize the app with all of it's extensions and settings.
|
||||||
"""
|
"""
|
||||||
app = Flask(__name__)
|
app = Flask(__name__,
|
||||||
|
static_folder="./../dist/static",
|
||||||
|
template_folder="./../dist"
|
||||||
|
)
|
||||||
|
|
||||||
# Load configuration values
|
# Load configuration values
|
||||||
if not env:
|
if not env:
|
||||||
@@ -39,4 +42,9 @@ def create_app(env=None):
|
|||||||
# noinspection PyUnresolvedReferences
|
# noinspection PyUnresolvedReferences
|
||||||
from server import api
|
from server import api
|
||||||
|
|
||||||
|
@app.route('/', defaults={'path': ''})
|
||||||
|
@app.route('/<path:path>')
|
||||||
|
def catch_all(path):
|
||||||
|
return render_template("index.html")
|
||||||
|
|
||||||
return app
|
return app
|
||||||
|
|||||||
Reference in New Issue
Block a user