File size: 507 Bytes
ba5672b
8e1f150
0918613
ba5672b
 
 
0918613
ba5672b
 
 
 
 
a3ed2ae
 
 
 
ba5672b
 
 
 
 
8e1f150
ba5672b
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
from flask import Flask, send_from_directory
from waitress import serve
from flask_cors import CORS, cross_origin


app = Flask(__name__)
CORS(app)

@app.route('/')
def index():
    return send_from_directory('dist', "index.html")

@app.route('/<path:filename>')
def download_file(filename):
    return send_from_directory('.', filename)

@app.route('/assets/<path:filename>')
def download_file(filename):
    return send_from_directory('dist/assets', filename)

if __name__ == '__main__':
    serve(app)