Changed from hard coded relative path to detect the scripts path and dynamically generate the correct path.

This means that it can be run from any directory which is useful with startup scripts.
pull/1/head
Rob Shaw 2016-04-07 14:59:08 +01:00
rodzic c790a842a0
commit 79aab4ef8f
1 zmienionych plików z 1 dodań i 1 usunięć

Wyświetl plik

@ -44,7 +44,7 @@ def index():
@app.route('/picoreflow/:filename#.*#')
def send_static(filename):
log.debug("serving %s" % filename)
return bottle.static_file(filename, root='./public/')
return bottle.static_file(filename, root=os.path.join(os.path.dirname(os.path.realpath(sys.argv[0])), "public"))
def get_websocket_from_request():