summaryrefslogtreecommitdiff
path: root/app.py
diff options
context:
space:
mode:
Diffstat (limited to 'app.py')
-rw-r--r--app.py7
1 files changed, 5 insertions, 2 deletions
diff --git a/app.py b/app.py
index d69e8e1..36d2c86 100644
--- a/app.py
+++ b/app.py
@@ -21,6 +21,7 @@ AUTH_BASE_URL = 'https://oauth.battle.net/authorize'
TOKEN_URL = "https://oauth.battle.net/token"
client = WebApplicationClient(CLIENT_ID)
+# Database initialization
DB_PATH = "thisisadatabasethatcontainsdata.db"
connection = sqlite3.connect(DB_PATH)
@@ -30,12 +31,15 @@ cursor.executescript("""
username VARCHAR(12) NOT NULL,
preferredRole VARCHAR(6) NOT NULL,
motivation TEXT NOT NULL,
+
+ CREATE TABLE IF NOT EXISTS users (
userId INTEGER UNIQUE NOT NULL
);
""")
cursor.close()
connection.close()
+
app = Bottle()
plugin = sqlite.Plugin(dbfile=DB_PATH)
app.install(plugin)
@@ -128,5 +132,4 @@ def server_static(type, filename):
return static_file(filename, root=f"./static/{type}/")
debug(True)
-run(app, host='localhost', port=8080, reloader=True,
- server="gevent", keyfile="./pki/server.key", certfile="./pki/server.crt")
+run(app, host='localhost', port=8080, server="gevent", keyfile="./pki/server.key", certfile="./pki/server.crt", reloader=True)