From 1fa7e43bbe4293fc51fcdc113941df37daaec44d Mon Sep 17 00:00:00 2001 From: Thomas Rubini <74205383+ThomasRubini@users.noreply.github.com> Date: Thu, 17 Nov 2022 16:07:13 +0100 Subject: [PATCH] basic structure --- app.py | 4 ++++ truthseeker/__init__.py | 11 +++++++++++ truthseeker/api.py | 6 ++++++ 3 files changed, 21 insertions(+) create mode 100644 app.py create mode 100644 truthseeker/__init__.py create mode 100644 truthseeker/api.py diff --git a/app.py b/app.py new file mode 100644 index 0000000..85345e1 --- /dev/null +++ b/app.py @@ -0,0 +1,4 @@ +from truthseeker import app # the variable 'app' is detected by `flask run` + +if __name__ == "__main__": + app.run() diff --git a/truthseeker/__init__.py b/truthseeker/__init__.py new file mode 100644 index 0000000..a07c2f2 --- /dev/null +++ b/truthseeker/__init__.py @@ -0,0 +1,11 @@ +import flask + +from truthseeker import api + +app = flask.Flask("truthseeker") + +app.register_blueprint(api.api_routes, url_prefix="/api/v1") + +@app.route("/") +def hello(): + return "Hello World!" \ No newline at end of file diff --git a/truthseeker/api.py b/truthseeker/api.py new file mode 100644 index 0000000..6018b1e --- /dev/null +++ b/truthseeker/api.py @@ -0,0 +1,6 @@ +import flask +api_routes = flask.Blueprint("api", __name__) + +@api_routes.route("/newGame") +def hello(): + return "Created new game"