Add json import/export
This commit is contained in:
+4
-4
@@ -80,11 +80,11 @@ def serve(
|
||||
"""
|
||||
|
||||
# delay loading the app until we have configured our environment
|
||||
from ttfrog.db.bootstrap import bootstrap
|
||||
from ttfrog.db.bootstrap import loader
|
||||
from ttfrog.webserver import application
|
||||
|
||||
print("Starting TableTop Frog server...")
|
||||
bootstrap()
|
||||
loader.load()
|
||||
application.start(host=host, port=port, debug=debug)
|
||||
|
||||
|
||||
@@ -93,13 +93,13 @@ def setup(context: typer.Context):
|
||||
"""
|
||||
(Re)Initialize TableTop Frog. Idempotent; will preserve any existing configuration.
|
||||
"""
|
||||
from ttfrog.db.bootstrap import bootstrap
|
||||
from ttfrog.db.bootstrap import loader
|
||||
|
||||
if not os.path.exists(app_state["env"]):
|
||||
app_state["env"].parent.mkdir(parents=True, exist_ok=True)
|
||||
app_state["env"].write_text(dedent(SETUP_HELP))
|
||||
print(f"Wrote defaults file {app_state['env']}.")
|
||||
bootstrap()
|
||||
loader.load()
|
||||
|
||||
|
||||
@db_app.command()
|
||||
|
||||
Reference in New Issue
Block a user