shutdown_documentation.py 330 B

123456789101112
  1. from nicegui import ui
  2. def main_demo() -> None:
  3. from nicegui import app
  4. # ui.button('shutdown', on_click=app.shutdown)
  5. #
  6. # ui.run(reload=False)
  7. # END OF DEMO
  8. ui.button('shutdown', on_click=lambda: ui.notify(
  9. 'Nah. We do not actually shutdown the documentation server. Try it in your own app!'))