generated from github/codespaces-flask
-
Notifications
You must be signed in to change notification settings - Fork 0
/
app.py
38 lines (33 loc) · 734 Bytes
/
app.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
from flask import Flask, render_template
import json
app = Flask(__name__)
data = { "users" : [
{
"Name" : "Hasan Iqbal",
"Age": "35",
"Email" : "iqbal@global.com",
"Phone": "215-226-5465"
},
{
"Name" : "John Doe",
"Age": "35",
"Email" : "iqbal@global.com",
"Phone": "215-226-5465"
},
{
"Name" : "Jane doe",
"Age": "35",
"Email" : "iqbal@global.com",
"Phone": "215-226-5465"
}
]
}
@app.route("/")
def hello_world():
return render_template("index.html", title="Hello Hasan from AWS")
@app.route("/Profile", methods=["POST", "GET"])
def Hasan():
return json.dumps(data)
@app.route("/Account")
def Account():
return "Account Endpoint from AWS"