blob: cfedee59d2462009f00f44b5e703a6f8fe78b252 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
|
from bottle import Bottle, run, debug, static_file
from bottle import jinja2_template as template
app = Bottle()
@app.route("/")
@app.route("/index.html")
def index():
return template("index")
@app.route("/<type:re:styles|images>/<filename>")
def server_static(type, filename):
return static_file(filename, root=f"./static/{type}/")
debug(True)
run(app, host='localhost', port=8080, reloader=True)
|