1
0

frontend.py 437 B

12345678910111213141516171819
  1. from fastapi import FastAPI
  2. def init(app: FastAPI) -> None:
  3. import builtins
  4. builtins.nicegui_APP = app
  5. from nicegui import ui, globals
  6. @ui.page('/show')
  7. def show():
  8. ui.label('Hello World, FastAPI!')
  9. globals.title = 'FastAPI'
  10. globals.favicon = None
  11. globals.dark = False
  12. globals.binding_refresh_interval = 0.1
  13. globals.excludes = []
  14. globals.host = 'localhost'
  15. globals.port = 8000