Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -1,18 +1,14 @@
|
|
1 |
from flask import Flask, render_template, send_from_directory
|
2 |
|
3 |
-
app = Flask(__name__)
|
4 |
|
5 |
@app.route('/')
|
6 |
def index():
|
7 |
return render_template('index.html')
|
8 |
|
9 |
-
@app.route('/
|
10 |
-
def
|
11 |
-
return send_from_directory('static',
|
12 |
-
|
13 |
-
@app.route('/script.js')
|
14 |
-
def script():
|
15 |
-
return send_from_directory('static', 'script.js')
|
16 |
|
17 |
if __name__ == '__main__':
|
18 |
app.run(debug=True, host='0.0.0.0', port=7860)
|
|
|
1 |
from flask import Flask, render_template, send_from_directory
|
2 |
|
3 |
+
app = Flask(__name__, template_folder='templates', static_folder='static')
|
4 |
|
5 |
@app.route('/')
|
6 |
def index():
|
7 |
return render_template('index.html')
|
8 |
|
9 |
+
@app.route('/static/<path:filename>')
|
10 |
+
def serve_static(filename):
|
11 |
+
return send_from_directory('static', filename)
|
|
|
|
|
|
|
|
|
12 |
|
13 |
if __name__ == '__main__':
|
14 |
app.run(debug=True, host='0.0.0.0', port=7860)
|