uep-asi/tests/flask_test_server.py
Mikołaj Kaczmarek 48450702a9
Zadanie 4 - testy
2025-06-15 22:55:35 +02:00

15 lines
341 B
Python

import threading
import time
from src.main import app
def run_app():
app.run(host="127.0.0.1", port=5000, debug=False, use_reloader=False)
def start_flask_in_thread():
thread = threading.Thread(target=run_app)
thread.daemon = True
thread.start()
# Wait a bit for the server to start
time.sleep(2)
return thread