summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--back/app.py4
-rw-r--r--back/config.py3
2 files changed, 5 insertions, 2 deletions
diff --git a/back/app.py b/back/app.py
index 2b8cf6f..7aa4607 100644
--- a/back/app.py
+++ b/back/app.py
@@ -1,7 +1,7 @@
from __future__ import annotations
from sanic import Sanic
from sanic.response import json as response_json, file
-from config import APP_DIR, debug as is_debug
+from config import APP_DIR, debug as is_debug, sanic_host, sanic_port
from aioredis import create_redis_pool
from dataclasses import dataclass, fields, asdict
import json
@@ -109,4 +109,4 @@ async def get_todos(req):
if __name__ == "__main__":
- app.go_fast(host="0.0.0.0", port=8000, debug=is_debug)
+ app.go_fast(host=sanic_host, port=sanic_port, debug=is_debug)
diff --git a/back/config.py b/back/config.py
index 367e24f..6fbfd95 100644
--- a/back/config.py
+++ b/back/config.py
@@ -12,3 +12,6 @@ APP_DIR = os.path.realpath(os.path.dirname(modpath))
REDIS_HOST = "localhost"
debug = True
+
+sanic_host = "localhost"
+sanic_port = 8001