-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathapp.py
41 lines (36 loc) · 754 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
39
40
41
from flask import Flask, jsonify, render_template
app = Flask(__name__)
JOBS=[
{
'id':1,
'title': 'student',
'location': 'Nghệ An',
'salary':'VND. 1,000,000'
},
{
'id':2,
'title': 'back-end engineer',
'location': 'Hà Nội',
'salary':'VND. 15,500,000'
},
{
'id':3,
'title': 'front-end engineer',
'location': 'Hồ Chí Minh',
'salary':'VND. 12,000,000'
},
{
'id':4,
'title': 'AI',
'location': 'Singapore',
'salary':'$. 30,000'
}
]
@app.route("/")
def hello_world():
return render_template('home.html',jobs=JOBS,company_name='STrong')
@app.route("/ap/jobs")
def list_job():
return jsonify(JOBS)
if __name__ == '__main__':
app.run(host = '0.0.0.0', debug = True)