From c6b17306d9b9dcd21db92107036076599196c4f5 Mon Sep 17 00:00:00 2001 From: Anorak_1 Date: Sun, 30 Oct 2022 16:24:08 +0100 Subject: [PATCH] Edited: backend.py Added basic "hello world" get request --- backend.py | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/backend.py b/backend.py index 9cf13eb..2bb58ca 100644 --- a/backend.py +++ b/backend.py @@ -1 +1,15 @@ -# Init \ No newline at end of file +from flask import Flask +from flask_restful import Resource, Api + +app = Flask("LeaderAPI") +api = Api(app) + +class LeaderAPI(Resource): + + def get(self): + return "Hello world!" + +api.add_resource(LeaderAPI, "/") + +if __name__ == "__main__": + app.run() \ No newline at end of file