Enable reloader for hypercorn (does nothing?), add repl command with bpython

This commit is contained in:
2024-10-24 04:01:39 -05:00
parent a3d5bb4592
commit 98ef2d2aa6

View File

@@ -8,11 +8,19 @@ def main(*args):
from linkpulse.app import app
config = Config()
config.use_reloader = True
asyncio.run(serve(app, config))
elif args[0] == "migrate":
from linkpulse.migrate import main
main(*args[1:])
elif args[0] == "repl":
import linkpulse
lp = linkpulse
from linkpulse.app import app, db
from linkpulse.models import BaseModel, IPAddress
from bpython import embed
embed(locals())
else:
print("Invalid command: {}".format(args[0]))