-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathrun.py
More file actions
32 lines (23 loc) · 755 Bytes
/
run.py
File metadata and controls
32 lines (23 loc) · 755 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
from flask import *
import flask
app = Flask(__name__)
@app.route('/guide/post/<name>')
@app.route('/guide')
def post_name(name=""):
return send_file('index.html')
@app.route('/test')
def post_test(name=""):
return send_file('test.html')
@app.route('/<id>')
def route_id(id):
return flask.request.path
@app.route('/bower_components/<path:filename>')
def bower_components(filename):
return send_from_directory('./bower_components/', filename)
@app.route('/guide/posts/<path:filename>')
def posts(filename):
return send_from_directory('./posts/', filename,cache_timeout=0)
@app.route('/template/<path:filename>')
def template(filename):
return send_from_directory('./template/', filename)
app.run(debug=True,host="0.0.0.0")