File size: 574 Bytes
8bbc0e5
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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, 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)))