Add running route planner with quality comparison and GPX export
This commit is contained in:
@@ -26,9 +26,14 @@ def create_app(config=None):
|
||||
LOCAL_SETUP=not production,
|
||||
DATA_ROOT=os.environ.get("DATA_ROOT", str(ROOT / "data" / "garmin")),
|
||||
TOKEN_ENCRYPTION_KEY=os.environ.get("TOKEN_ENCRYPTION_KEY"),
|
||||
ORS_API_KEY=os.environ.get("ORS_API_KEY"),
|
||||
RATELIMIT_STORAGE_URI=os.environ.get("RATELIMIT_STORAGE_URI", "memory://"),
|
||||
)
|
||||
app.config.update(config or {})
|
||||
if not app.config.get("ORS_API_KEY") and not production:
|
||||
routing_key = Path(app.instance_path) / "ors-api-key"
|
||||
if routing_key.is_file():
|
||||
app.config["ORS_API_KEY"] = routing_key.read_text(encoding="utf-8").strip()
|
||||
if production:
|
||||
from werkzeug.middleware.proxy_fix import ProxyFix
|
||||
|
||||
@@ -64,6 +69,9 @@ def create_app(config=None):
|
||||
from .routes import web
|
||||
|
||||
app.register_blueprint(web)
|
||||
from .planner import planner
|
||||
|
||||
app.register_blueprint(planner)
|
||||
from .sync import register_cli
|
||||
|
||||
register_cli(app)
|
||||
|
||||
Reference in New Issue
Block a user