This repository was archived by the owner on Sep 12, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 4 files changed +37
-0
lines changed Expand file tree Collapse file tree 4 files changed +37
-0
lines changed Original file line number Diff line number Diff line change
1
+ from app import create_app
2
+ import os
3
+
4
+ app = create_app ()
5
+
6
+ if __name__ == "__main__" :
7
+ app .run (debug = bool (os .environ .get ("FLASK_DEBUG" , False )))
Original file line number Diff line number Diff line change
1
+ from flask import Flask
2
+ from app .routes import api
3
+
4
+
5
+ def create_app ():
6
+ app = Flask (__name__ )
7
+
8
+ app .register_blueprint (api , url_prefix = "/api" )
9
+
10
+ return app
Original file line number Diff line number Diff line change
1
+ from flask import Blueprint , jsonify
2
+
3
+ api = Blueprint ("api" , __name__ )
4
+
5
+
6
+ @api .route ("/status/health-check" , methods = ["GET" ])
7
+ def status_health_check ():
8
+ return jsonify ({"status" : "healthy" }), 200
Original file line number Diff line number Diff line change
1
+ from app import create_app
2
+
3
+
4
+ def test_health_check ():
5
+ """Responds with a 200 status code and a healthy status message."""
6
+ app = create_app ()
7
+ client = app .test_client ()
8
+
9
+ response = client .get ('/api/status/health-check' )
10
+
11
+ assert response .status_code == 200
12
+ assert response .get_json () == {"status" : "healthy" }
You can’t perform that action at this time.
0 commit comments