Spaces:
Sleeping
Sleeping
File size: 538 Bytes
13466f4 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 | import os
from flask import Flask, render_template, send_from_directory, jsonify
app = Flask(__name__, static_folder='static', template_folder='templates')
@app.route('/')
def index():
return render_template('index.html')
@app.route('/healthz')
def healthz():
return jsonify({"status": "ok"}), 200
@app.route('/static/<path:path>')
def send_static(path):
return send_from_directory('static', path)
if __name__ == '__main__':
port = int(os.environ.get('PORT', 7860))
app.run(host='0.0.0.0', port=port, debug=True)
|