tll / app.py
hxger's picture
Upload 2 files
8bbc0e5 verified
raw
history blame contribute delete
574 Bytes
import os
from flask import Flask, redirect, jsonify
app = Flask(__name__)
@app.route('/')
def home():
"""重定向到项目GitHub页面"""
return redirect('https://github.com/EverythingSuckz/TG-FileStreamBot')
@app.route('/health')
def health():
"""健康检查端点"""
return jsonify({
'status': 'ok',
'message': 'TG-FileStreamBot 正在运行!'
})
if __name__ == '__main__':
# 这个文件在Docker中不会直接运行,仅作为参考
app.run(host='0.0.0.0', port=int(os.environ.get('PORT', 7860)))