diff --git a/amanuensis/app.py b/amanuensis/app.py new file mode 100644 index 0000000..0c87e9c --- /dev/null +++ b/amanuensis/app.py @@ -0,0 +1,7 @@ +from flask import Flask, render_template + +app = Flask(__name__) + +@app.route("/") +def root(): + return render_template("admin.html", username="guest") diff --git a/amanuensis/cli.py b/amanuensis/cli.py index 32e6cb2..b314e03 100644 --- a/amanuensis/cli.py +++ b/amanuensis/cli.py @@ -65,6 +65,13 @@ def command_init(args): os.mkdir(os.path.join(cfd, "lexicon")) os.mkdir(os.path.join(cfd, "user")) +@add_argument("-a", "--address", default="127.0.0.1") +@add_argument("-p", "--port", default="5000") +def command_run(args): + """Runs the default Flask development server""" + from app import app + app.run(host=args.address, port=args.port) + @add_argument("--foo", action="store_true") def command_dump(args): """Dumps the global config or the config for the given lexicon""" diff --git a/amanuensis/templates/admin.html b/amanuensis/templates/admin.html new file mode 100644 index 0000000..1db858a --- /dev/null +++ b/amanuensis/templates/admin.html @@ -0,0 +1,6 @@ + + +
+