aboutsummaryrefslogtreecommitdiff
path: root/api/main.py
diff options
context:
space:
mode:
Diffstat (limited to 'api/main.py')
-rw-r--r--api/main.py16
1 files changed, 10 insertions, 6 deletions
diff --git a/api/main.py b/api/main.py
index 052a6eb..15ead1e 100644
--- a/api/main.py
+++ b/api/main.py
@@ -1,7 +1,4 @@
-from flask import Flask
-from flask_socketio import SocketIO
-
-app = Flask(__name__)
+from app import app
from status import status
from user.info import info
@@ -10,14 +7,21 @@ from auth.login import login
from auth.login_token import token
from game.new import new_game
from game.random import random_game
-from game.socket import run
app.register_blueprint(status, url_prefix='/')
+
app.register_blueprint(info, url_prefix='/user')
+
app.register_blueprint(signup, url_prefix='/auth')
app.register_blueprint(login, url_prefix='/auth')
app.register_blueprint(token, url_prefix='/auth')
+
app.register_blueprint(new_game, url_prefix='/game')
app.register_blueprint(random_game, url_prefix='/game')
-if __name__ == "__main__": run(app)
+from socket_io import io
+import game.socket
+
+if __name__ == "__main__":
+ io.run(app, host="127.0.0.1", port=5000, debug=True)
+