Skip to content

Commit

Permalink
feat(__main__.py): add an /health endpoint
Browse files Browse the repository at this point in the history
external services can assess if the webapp is alive by calling '/health'
  • Loading branch information
Michele-Alberti committed Jan 25, 2024
1 parent 038206e commit 0a1169c
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion dlunch/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,8 +63,12 @@ def run_app(config: DictConfig):
# ensure that each invocation has a dedicated state variable (users'
# selections are not shared between instances)
# Backend exist only if auth is active
# Health is an endpoint for app health assessments
# Pass a dictionary for a multipage app
pages = {"": lambda: create_app(config=config)}
pages = {
"": lambda: create_app(config=config),
"health": pn.Column("Data-Lunch is alive!"),
}
if auth.is_auth_active(config=config):
pages["backend"] = lambda: create_backend(config=config)

Expand Down

0 comments on commit 0a1169c

Please sign in to comment.