Skip to content

Commit

Permalink
fixes #410
Browse files Browse the repository at this point in the history
  • Loading branch information
jph00 committed Sep 9, 2024
1 parent 1ed8828 commit a6e300a
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions fasthtml/fastapp.py
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ def fast_app(
bodykw:Optional[dict]=None, # Attrs to add to the Body tag
reload_attempts:Optional[int]=1, # Number of reload attempts when live reloading
reload_interval:Optional[int]=1000, # Time between reload attempts in ms
static_path:str="", # Where the static file route points to, defaults to root dir
static_path:str=".", # Where the static file route points to, defaults to root dir
**kwargs)->Any:
"Create a FastHTML or FastHTMLWithLiveReload app."
h = (picolink,) if pico or (pico is None and default_hdrs) else ()
Expand All @@ -78,7 +78,7 @@ def fast_app(
session_cookie=session_cookie, max_age=max_age, sess_path=sess_path, same_site=same_site, sess_https_only=sess_https_only,
sess_domain=sess_domain, key_fname=key_fname, ws_hdr=ws_hdr, surreal=surreal, htmx=htmx, htmlkw=htmlkw,
reload_attempts=reload_attempts, reload_interval=reload_interval, **(bodykw or {}))
app.static_route_exts()
app.static_route_exts(static_path=static_path)
if not db_file: return app,app.route

db = database(db_file)
Expand Down
4 changes: 2 additions & 2 deletions nbs/api/10_fastapp.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@
" bodykw:Optional[dict]=None, # Attrs to add to the Body tag\n",
" reload_attempts:Optional[int]=1, # Number of reload attempts when live reloading\n",
" reload_interval:Optional[int]=1000, # Time between reload attempts in ms\n",
" static_path:str=\"\", # Where the static file route points to, defaults to root dir\n",
" static_path:str=\".\", # Where the static file route points to, defaults to root dir\n",
" **kwargs)->Any:\n",
" \"Create a FastHTML or FastHTMLWithLiveReload app.\"\n",
" h = (picolink,) if pico or (pico is None and default_hdrs) else ()\n",
Expand All @@ -135,7 +135,7 @@
" session_cookie=session_cookie, max_age=max_age, sess_path=sess_path, same_site=same_site, sess_https_only=sess_https_only,\n",
" sess_domain=sess_domain, key_fname=key_fname, ws_hdr=ws_hdr, surreal=surreal, htmx=htmx, htmlkw=htmlkw,\n",
" reload_attempts=reload_attempts, reload_interval=reload_interval, **(bodykw or {}))\n",
" app.static_route_exts()\n",
" app.static_route_exts(static_path=static_path)\n",
" if not db_file: return app,app.route\n",
"\n",
" db = database(db_file)\n",
Expand Down

0 comments on commit a6e300a

Please sign in to comment.