Add CI and related fixes (#1)
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
Reviewed-on: #1 Co-authored-by: Juanjo Gutiérrez <juanjo@gutierrezdequevedo.com> Co-committed-by: Juanjo Gutiérrez <juanjo@gutierrezdequevedo.com>
This commit is contained in:
parent
50d66c2985
commit
df5b0b4400
6 changed files with 87 additions and 9 deletions
9
app.py
9
app.py
|
|
@ -1,18 +1,17 @@
|
|||
from flask import Flask, send_from_directory
|
||||
import os
|
||||
|
||||
app = Flask(__name__, static_folder='static', static_url_path='/static')
|
||||
|
||||
|
||||
@app.route('/')
|
||||
def index():
|
||||
return send_from_directory('static', 'index.html')
|
||||
|
||||
# Serve static files
|
||||
|
||||
@app.route('/<path:filename>')
|
||||
def static_files(filename):
|
||||
return send_from_directory('static', filename)
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
import sys
|
||||
port = int(sys.argv[1]) if len(sys.argv) > 1 else 5000
|
||||
app.run(debug=True, host='0.0.0.0', port=port)
|
||||
app.run(debug=True, host='0.0.0.0', port=5000)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue