From 358d0f2a3df7d814ff8ee083d069e7ce87a2ac86 Mon Sep 17 00:00:00 2001 From: gezish Date: Fri, 3 Mar 2023 21:15:49 +0300 Subject: [PATCH 1/2] initial2 --- app.py | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 app.py diff --git a/app.py b/app.py new file mode 100644 index 0000000..9105306 --- /dev/null +++ b/app.py @@ -0,0 +1,10 @@ +from flask import Flask, jsonify, request + +# Intitialise the app +app = Flask(__name__) + +# Define what the app does +@app.route("/greet") +def index(): + + return "Hello world" \ No newline at end of file From 9e82c2ea45d67154b2ca0d22bcba1eef7c32796f Mon Sep 17 00:00:00 2001 From: gezish Date: Sat, 4 Mar 2023 15:15:18 +0300 Subject: [PATCH 2/2] end of one --- app.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/app.py b/app.py index 9105306..e85bd6c 100644 --- a/app.py +++ b/app.py @@ -4,7 +4,7 @@ app = Flask(__name__) # Define what the app does -@app.route("/greet") +@app.get("/greet") def index(): - - return "Hello world" \ No newline at end of file + response = {"data":"value is hellow world"} + return jsonify(response) \ No newline at end of file