-
Does idom support any kind of hot reloading? can it be used with other python reloading mechanisms? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
As explained here, IDOM can be run using a variety of different web servers. As such, whether hot-reloading is supported and how to enable it depend on you choice of server. For example, to enable hot-reloading in Flask, we can write the following: # hello.py
from flask import Flask
from idom import component, html
from idom.backend.flask import configure
@component
def HelloWorld():
return html.h1("Hello, world!")
app = Flask(__name__)
configure(app, HelloWorld) And then follow the flask documentation on how to run with hot-reloading: flask --app hello --debug run If you chose a different server implementation, this answer would change. Like if you used one of the supported ASGI servers (e.g. FastAPI) and ran it with uvicorn, you'd need to follow Uvicorn's directions on reloading behavior instead. |
Beta Was this translation helpful? Give feedback.
As explained here, IDOM can be run using a variety of different web servers. As such, whether hot-reloading is supported and how to enable it depend on you choice of server. For example, to enable hot-reloading in Flask, we can write the following:
And then follow the flask documentation on how to run with hot-reloading:
If you chose a different server implementation, this answer would change. Like if you used one of the supported ASGI …