21 lines
451 B
Python
21 lines
451 B
Python
# topology_api/app.py
|
|
from flask import Flask
|
|
from topology_api.config import API_HOST, API_PORT, API_DEBUG
|
|
from topology_api.routes.snapshot import snapshot_bp
|
|
|
|
|
|
def create_app():
|
|
app = Flask(__name__)
|
|
app.register_blueprint(snapshot_bp)
|
|
|
|
@app.route("/health")
|
|
def health():
|
|
return {"status": "ok"}
|
|
|
|
return app
|
|
|
|
|
|
if __name__ == "__main__":
|
|
app = create_app()
|
|
app.run(host=API_HOST, port=API_PORT, debug=API_DEBUG)
|