2022-07-27 15:45:17 +01:00
|
|
|
import click
|
2022-07-08 09:24:54 +01:00
|
|
|
import uvicorn
|
|
|
|
|
|
|
|
|
|
|
|
@click.command()
|
2022-07-27 15:45:17 +01:00
|
|
|
@click.option("--port", default="5000", help="Port to run LNBits on")
|
|
|
|
@click.option("--host", default="127.0.0.1", help="Host to run LNBits on")
|
2022-07-08 09:24:54 +01:00
|
|
|
def main(port, host):
|
|
|
|
"""Launched with `poetry run lnbits` at root level"""
|
|
|
|
uvicorn.run("lnbits.__main__:app", port=port, host=host)
|
|
|
|
|
2022-07-27 15:45:17 +01:00
|
|
|
|
|
|
|
if __name__ == "__main__":
|
2022-07-08 09:24:54 +01:00
|
|
|
main()
|
|
|
|
|
2022-07-27 15:45:17 +01:00
|
|
|
# def main():
|
2022-07-08 09:24:54 +01:00
|
|
|
# """Launched with `poetry run start` at root level"""
|
|
|
|
# uvicorn.run("lnbits.__main__:app")
|