HarishMaths commited on
Commit
050581c
·
verified ·
1 Parent(s): fec4cbb

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +8 -5
app.py CHANGED
@@ -1,7 +1,10 @@
1
- from fastapi import FastAPI
2
 
3
- app = FastAPI()
4
 
5
- @app.get("/api")
6
- def read_data():
7
- return {"message": "Hello from FastAPI!"}
 
 
 
 
1
+ from flask import Flask, jsonify
2
 
3
+ app = Flask(__name__)
4
 
5
+ @app.route("/api", methods=["GET"])
6
+ def hello():
7
+ return jsonify({"message": "Hello from Flask!"})
8
+
9
+ if __name__ == "__main__":
10
+ app.run(host="0.0.0.0", port=8000)