mirror of
https://git.ianrenton.com/ian/spothole.git
synced 2026-06-24 05:35:10 +00:00
Merge branch 'main' into 95-send-spots-to-xota
# Conflicts: # README.md # server/handlers/api/addspot.py # server/handlers/api/options.py # spotproviders/tiles.py # templates/about.html # templates/add_spot.html # templates/alerts.html # templates/api_only_home.html # templates/bands.html # templates/base.html # templates/conditions.html # templates/map.html # templates/spots.html # templates/status.html # webassets/css/style.css # webassets/js/add-spot.js # webassets/js/geo.js # webassets/js/ui-ham.js # webassets/js/utils.js
This commit is contained in:
@@ -18,6 +18,8 @@ from server.handlers.api.status import APIStatusHandler
|
||||
from server.handlers.metrics import PrometheusMetricsHandler
|
||||
from server.handlers.pagetemplate import PageTemplateHandler
|
||||
|
||||
_HERE = os.path.dirname(__file__ or "")
|
||||
|
||||
|
||||
class WebServer:
|
||||
"""Provides the public-facing web server."""
|
||||
@@ -102,11 +104,11 @@ class WebServer:
|
||||
misc_routes = [
|
||||
(r"/apidocs", PageTemplateHandler, {"template_name": "apidocs", **handler_opts}),
|
||||
(r"/metrics", PrometheusMetricsHandler),
|
||||
(r"/(.*)", StaticFileHandler, {"path": os.path.join(os.path.dirname(__file__), "../webassets")})
|
||||
(r"/(.*)", StaticFileHandler, {"path": os.path.join(_HERE, "../webassets")})
|
||||
]
|
||||
|
||||
app = tornado.web.Application(api_routes + ui_routes + misc_routes,
|
||||
template_path=os.path.join(os.path.dirname(__file__), "../templates"),
|
||||
template_path=os.path.join(_HERE, "../templates"),
|
||||
debug=False)
|
||||
app.listen(self._port)
|
||||
logging.info("Web server running on port " + str(WEB_SERVER_PORT))
|
||||
|
||||
Reference in New Issue
Block a user