File size: 896 Bytes
339a658
acd4009
339a658
 
5b0465a
 
339a658
 
5b0465a
339a658
 
5b0465a
339a658
 
 
5b0465a
339a658
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
from app import app

if __name__ == "__main__":
    app.run()

# wsgi.py
# from flask import Flask, jsonify, request
# from flask_cors import CORS

# app = Flask(__name__)
# CORS(app)  

# @app.get("/health")
# def health():
#     return "ok", 200

# @app.get("/")
# def index():
#     routes = sorted(str(r) for r in app.url_map.iter_rules())
#     return jsonify(
#         status="ok",
#         message="SAFIM execution engine is running",
#         routes=routes,
#         examples={
#             "health": "GET /health",
#             "runtimes": "GET /runtimes  # если у вас есть этот эндпоинт",
#             "execute_code": {
#                 "method": "POST",
#                 "path": "/execute_code  # или ваш реальный путь",
#                 "json": {"language": "python", "code": "print(1)"},
#             },
#         },
#     ), 200