mirror of
https://github.com/Xevion/linkpulse.git
synced 2025-12-07 03:15:37 -06:00
Enable reloader for hypercorn (does nothing?), add repl command with bpython
This commit is contained in:
@@ -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]))
|
||||
|
||||
|
||||
Reference in New Issue
Block a user