forked from HackerVik/CodecoolFriedChicken
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathserver.py
More file actions
36 lines (25 loc) · 673 Bytes
/
server.py
File metadata and controls
36 lines (25 loc) · 673 Bytes
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
from flask import Flask, render_template, request
app = Flask(__name__)
@app.route('/')
def index():
return render_template("index.html")
@app.route('/memory')
def memory():
try:
diff = int(request.args.get("diff", 4))
except ValueError:
diff = None
image_num = request.args.get("diff", 5)
return render_template("memory.html" , diff=diff, image_num=image_num)
@app.route('/widow')
def widow():
return render_template('black-widow.html')
@app.route('/about')
def about():
return render_template('about.html')
if __name__ == '__main__':
app.run(
host="0.0.0.0",
port=5000,
debug=True,
)