Rename app package to server

This commit is contained in:
Tim Van Baak 2020-01-08 21:44:08 -08:00
parent 872e055a3f
commit 4bd7330229
2 changed files with 3 additions and 3 deletions

View File

@ -108,13 +108,13 @@ def command_generate_secret(args):
@add_argument("-p", "--port", default="5000") @add_argument("-p", "--port", default="5000")
def command_run(args): def command_run(args):
"""Runs the default Flask development server""" """Runs the default Flask development server"""
import app import server
import config import config
if config.get("secret_key") is None: if config.get("secret_key") is None:
config.logger.error("Can't run server without a secret_key. Run generate-secret first") config.logger.error("Can't run server without a secret_key. Run generate-secret first")
return -1 return -1
app.app.run(host=args.address, port=args.port) server.app.run(host=args.address, port=args.port)
@add_argument("--username", help="User's login handle") @add_argument("--username", help="User's login handle")
@add_argument("--displayname", help="User's publicly displayed name") @add_argument("--displayname", help="User's publicly displayed name")

View File

@ -5,6 +5,6 @@ import config
app = Flask(__name__, template_folder="../templates") app = Flask(__name__, template_folder="../templates")
app.secret_key = bytes.fromhex(config.get('secret_key')) app.secret_key = bytes.fromhex(config.get('secret_key'))
from .auth import bp from server.auth import bp
app.register_blueprint(auth.bp) app.register_blueprint(auth.bp)