Skip to content

Hot Reloading #837

Answered by rmorshea
knoopx asked this question in Question
Nov 17, 2022 · 1 comments · 2 replies
Discussion options

You must be logged in to vote

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 …

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@allanleal
Comment options

@rmorshea
Comment options

Answer selected by rmorshea
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
3 participants