Skip to content

Commit

Permalink
created CLI command
Browse files Browse the repository at this point in the history
  • Loading branch information
wbaccinelli committed Jun 27, 2024
1 parent 520886b commit 8137afb
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 0 deletions.
Empty file added cli/__init__.py
Empty file.
21 changes: 21 additions & 0 deletions cli/cli.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
import click
from eit_dash.app import app


@click.group(invoke_without_command=True)
@click.pass_context
def cli(ctx):
"""Default prompt. It shows the help command"""
if ctx.invoked_subcommand is None:
click.echo(ctx.get_help())


@cli.command(name="run", help="Start the dashboard.")
def run():
"""Start the dashboard."""

app.run_server(debug=False)


if __name__ == "__main__":
cli()

0 comments on commit 8137afb

Please sign in to comment.