15 lines
508 B
Python
15 lines
508 B
Python
from pathlib import Path
|
|
import click
|
|
from .app import create_app
|
|
|
|
|
|
@click.command()
|
|
@click.option("--config", default="config.yaml", help="Path to config.yaml")
|
|
@click.option("--host", default="0.0.0.0")
|
|
@click.option("--port", default=5000, type=int)
|
|
@click.option("--debug", is_flag=True, default=False)
|
|
def main(config: str, host: str, port: int, debug: bool) -> None:
|
|
"""Start the FabledNetMon server."""
|
|
app = create_app(config_path=Path(config))
|
|
app.run(host=host, port=port, debug=debug)
|