From: Bdale Garbee Date: Tue, 27 May 2025 18:11:39 +0000 (-0600) Subject: arrange for cherrypy to serve /usr/share/javascript content at /javascript X-Git-Url: https://git.gag.com/?a=commitdiff_plain;h=ce5e8affa90bca0c1873e385a1cc386063d16aa1;p=fw%2Fquantimotor arrange for cherrypy to serve /usr/share/javascript content at /javascript --- diff --git a/ui/app.py b/ui/app.py index c79ef9f..14bdaee 100755 --- a/ui/app.py +++ b/ui/app.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python3 +#! /usr/bin/python3 # -*- coding: utf-8 -*- # # Copyright (C) 2025 Bdale Garbee . GPLv3+ @@ -178,7 +178,8 @@ def manageLEDs(): else: set_line_values("/dev/gpiochip0", {21: Value.ACTIVE}) -path = os.path.abspath(os.path.dirname(__file__)) +path = os.path.abspath(os.path.dirname(__file__)) +javascript_path = os.path.abspath("/usr/share/javascript") config = { 'global' : { 'server.socket_host' : '0.0.0.0', @@ -190,7 +191,11 @@ config = { '/': { 'tools.staticdir.on': True, 'tools.staticdir.dir': path, - 'tools.staticdir.index': 'index.html' + 'tools.staticdir.index': 'index.html', + }, + '/javascript': { + 'tools.staticdir.on': True, + 'tools.staticdir.dir': javascript_path, } }