1
0
mirror of https://github.com/thooge/esp32-nmea2000-obp60.git synced 2025-12-12 13:33:06 +01:00

free GwApi from ArduinoJson

This commit is contained in:
wellenvogel
2021-11-28 12:11:47 +01:00
parent d9af772a57
commit 5195c3be88
8 changed files with 37 additions and 20 deletions

View File

@@ -50,6 +50,7 @@ class RequestHandler(http.server.SimpleHTTPRequestHandler):
path = posixpath.normpath(path)
words = path.split('/')
words = list(filter(None, words))
isSecond=False
for baseDir in [
os.path.join(self.server.baseDir,'lib','generated'),
os.path.join(self.server.baseDir,'web')]:
@@ -63,6 +64,9 @@ class RequestHandler(http.server.SimpleHTTPRequestHandler):
rpath += '/'
if os.path.exists(rpath):
return rpath
if isSecond:
return rpath
isSecond=True
def run(port,apiUrl,server_class=http.server.HTTPServer, handler_class=RequestHandler):
basedir=os.path.join(os.path.dirname(__file__),'..')