mirror of
https://github.com/fusion44/blitz_api.git
synced 2026-08-15 12:10:12 +02:00
16 lines
384 B
Python
16 lines
384 B
Python
|
|
import uvicorn
|
||
|
|
|
||
|
|
import click # isort:skip
|
||
|
|
|
||
|
|
|
||
|
|
@click.command()
|
||
|
|
@click.option("--port", default="5000", help="Port to run Blitz API on")
|
||
|
|
@click.option("--host", default="127.0.0.1", help="Host to run Blitz API on")
|
||
|
|
def main(port, host):
|
||
|
|
"""Launched with `poetry run api` at root level"""
|
||
|
|
uvicorn.run("app.main:app", port=port, host=host)
|
||
|
|
|
||
|
|
|
||
|
|
if __name__ == "__main__":
|
||
|
|
main()
|