Skip to content

Commit 5b6721c

Browse files
committed
fix minor oversights
1 parent a7d1d3b commit 5b6721c

File tree

2 files changed

+3
-6
lines changed

2 files changed

+3
-6
lines changed

src/idom/backend/starlette.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -123,12 +123,12 @@ def _setup_common_routes(options: Options, app: Starlette) -> None:
123123
StaticFiles(directory=CLIENT_BUILD_DIR / "assets", check_dir=False),
124124
)
125125
# register this last so it takes least priority
126-
index_route = index_route(options)
126+
index_route = _make_index_route(options)
127127
app.add_route(url_prefix + "/", index_route)
128128
app.add_route(url_prefix + "/{path:path}", index_route)
129129

130130

131-
def index_route(options: Options) -> Callable[[Request], Awaitable[HTMLResponse]]:
131+
def _make_index_route(options: Options) -> Callable[[Request], Awaitable[HTMLResponse]]:
132132
index_html = read_client_index_html(options)
133133

134134
async def serve_index(request: Request) -> HTMLResponse:

src/idom/backend/tornado.py

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -125,10 +125,7 @@ def _setup_common_routes(options: Options) -> _RouteHandlerSpecs:
125125
(
126126
r"/(.*)",
127127
IndexHandler,
128-
{
129-
"path": str(CLIENT_BUILD_DIR),
130-
"index_html": read_client_index_html(options),
131-
},
128+
{"index_html": read_client_index_html(options)},
132129
),
133130
]
134131

0 commit comments

Comments
 (0)