Having to restart the app each time you make a change sucks. Live reloading would be a great feature to have.
If I were to suggest some things, I'd first suggest leveraging uvicorn's built-in --reload parameter which will automatically reload your app when something changes.
You can inject the javascript into the page's head with the html_head argument in QuickHTML
app = QuickHTML(html_head=Script(...))
Though we'll probably want another argument that can do that for us instead
Tasks:
[ ] An argument added to the QuickHTML class to allow for live reloading
[ ] A JS snippet to be injected into the rendered HTML page that will refresh the page when the codebase changes
Ideally this uses a websocket (which we haven't actually implemented support yet for)
Having to restart the app each time you make a change sucks. Live reloading would be a great feature to have.
If I were to suggest some things, I'd first suggest leveraging
uvicorn
's built-in--reload
parameter which will automatically reload your app when something changes.You can inject the javascript into the page's head with the
html_head
argument inQuickHTML
Though we'll probably want another argument that can do that for us instead
Tasks:
QuickHTML
class to allow for live reloading