Add autoreload option

This commit is contained in:
Correl Roush 2024-02-21 18:08:46 -05:00
parent cd3daf7525
commit 7f9e19a74f

View file

@ -55,14 +55,16 @@ def main(ctx, database, log_level):
@click.option("--scheme", envvar="TUTOR_SCHEME")
@click.option("--static", envvar="TUTOR_STATIC", type=click.Path(file_okay=False))
@click.option("--debug", is_flag=True)
@click.option("--reload", is_flag=True)
@click.pass_context
def server(ctx, port, scheme, static, debug):
def server(ctx, port, scheme, static, debug, reload):
app = tutor.server.Application(
**{
**ctx.obj,
"scheme": scheme,
"static": static,
"debug": debug,
"autoreload": reload,
}
)
app.listen(port)