This repository has been archived by the owner on Aug 16, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathlocal_server.py
69 lines (51 loc) · 2.01 KB
/
local_server.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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
from flask import Flask, send_from_directory
app = Flask(__name__)
@app.route("/")
def index():
return send_from_directory("public", "index.html")
@app.route("/<path:filename>/")
def base(filename):
return send_from_directory("public", filename + ".html")
@app.route("/css/<path:filename>")
def css(filename):
return send_from_directory("public/css", filename)
@app.route("/css/games/<path:filename>")
def css_games(filename):
return send_from_directory("public/css/games", filename)
@app.route("/css/other/<path:filename>")
def css_other(filename):
return send_from_directory("public/css/other", filename)
@app.route("/css/themes/<path:filename>")
def css_themes(filename):
return send_from_directory("public/css/themes", filename)
@app.route("/img/<path:filename>")
def img(filename):
return send_from_directory("public/img", filename)
@app.route("/img/about/<path:filename>")
def img_about(filename):
return send_from_directory("public/img/about", filename)
@app.route("/img/index/<path:filename>")
def img_index(filename):
return send_from_directory("public/img/index", filename)
@app.route("/img/photography/<path:filename>")
def img_photography(filename):
return send_from_directory("public/img/photography", filename)
@app.route("/img/photography/small/<path:filename>")
def img_photography_small(filename):
return send_from_directory("public/img/photography/small", filename)
@app.route("/other/<path:filename>/")
def other(filename):
return send_from_directory("public/other/", filename + ".html")
@app.route("/games/<path:filename>/")
def games(filename):
return send_from_directory("public/games/", filename + ".html")
@app.route("/quizzes/<path:filename>/")
def quizzes(filename):
return send_from_directory("public/quizzes/", filename + ".html")
@app.route("/src/<path:filename>")
def src(filename):
return send_from_directory("public/src", filename)
@app.route("/bangs")
def bangs():
return send_from_directory("public", "bangs.html")
app.run(port=80, debug=True)