1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
from bottle import * import os pwd = os.getcwd() @route('/') def server_static(): return static_file('index.html', root=pwd ) from bottle import static_file @route('/<filename>') def server_static(filename): return static_file(filename, root=pwd) @route('/<filepath:path>') def server_static(filepath): return static_file(filepath, root=pwd) run(host='localhost', port=8080)