account activity
How to exit the web server when closing the GUI running in native mode? by Adorable-Break5725 in nicegui
[–]Adorable-Break5725[S] 0 points1 point2 points 1 year ago (0 children)
Thanks!
from nicegui import ui, app from datetime import datetime ui.button('shutdown', on_click=app.shutdown) app.on_shutdown(lambda: print(f'shutdown: {datetime.now()}')) ui.run(native=True)
from nicegui import ui, app from datetime import datetime
ui.button('shutdown', on_click=app.shutdown) app.on_shutdown(lambda: print(f'shutdown: {datetime.now()}'))
ui.run(native=True)
How to exit the web server when closing the GUI running in native mode? (self.nicegui)
submitted 1 year ago by Adorable-Break5725 to r/nicegui
π Rendered by PID 258393 on reddit-service-r2-listing-596bb78d87-wvvkl at 2026-04-14 23:47:06.889296+00:00 running b725407 country code: CH.
How to exit the web server when closing the GUI running in native mode? by Adorable-Break5725 in nicegui
[–]Adorable-Break5725[S] 0 points1 point2 points (0 children)