from invoke import task


@task
def js(c):
    c.run("yarn run build")


@task(js)
def run(c, port=8080, host="127.0.0.1"):
    c.run(
        f"poetry run python -m frony -p {port} -h {host}",
        env={"FLASK_APP": "frony.py"},
    )
