AriStockAI/services/data-service/app.py
fanfpy 806e444297 feat: 添加aktools服务并更新架构文档
- 在data-service中添加aktools依赖和运行配置
- 更新Traefik配置添加压缩中间件
- 修改Consul配置启用ACL
- 更新README添加架构图和开发指南
- 添加架构图文档
2025-06-21 22:53:09 +08:00

20 lines
482 B
Python

from flask import Flask, jsonify
import threading
import subprocess
from register import register_to_consul
app = Flask(__name__)
@app.route("/health")
def health():
return jsonify({"status": "ok"}), 200
@app.route("/hello")
def hello():
return jsonify({"message": "Hello from service!"})
if __name__ == "__main__":
threading.Thread(target=register_to_consul).start()
subprocess.Popen(["aktools", "run", "--port", "8001"])
app.run(host="0.0.0.0", port=8000)