Work increment
This commit is contained in:
parent
8988f12a14
commit
42cd900638
2
config.yaml.example
Normal file
2
config.yaml.example
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
server_name: "valhalla"
|
||||||
|
server_port: 8088
|
@ -10,4 +10,5 @@ class Server(host, port, name, access_password, version):
|
|||||||
|
|
||||||
@app.route("/client/register")
|
@app.route("/client/register")
|
||||||
def register_new_client_to_database(self):
|
def register_new_client_to_database(self):
|
||||||
|
|
||||||
# TODO: implement
|
# TODO: implement
|
||||||
|
1
utils/config/__init__.py
Normal file
1
utils/config/__init__.py
Normal file
@ -0,0 +1 @@
|
|||||||
|
from utils.config import ServerConfig
|
16
utils/config/config.py
Normal file
16
utils/config/config.py
Normal file
@ -0,0 +1,16 @@
|
|||||||
|
import os
|
||||||
|
import yaml
|
||||||
|
|
||||||
|
class ServerConfig:
|
||||||
|
config_file = {}
|
||||||
|
|
||||||
|
with open("~/.config/orchestrator/config.yml", "r") as stream:
|
||||||
|
try:
|
||||||
|
config_file = yaml.safe_load(stream)
|
||||||
|
except Exception as e:
|
||||||
|
print(e)
|
||||||
|
|
||||||
|
config = config_file
|
||||||
|
|
||||||
|
server_name_override = os.environ.get("VALHALLA_SERVER_NAME")
|
||||||
|
server_port_override = os.environ.get("VALHALLA_SERVER_PORT")
|
0
utils/database/__init__.py
Normal file
0
utils/database/__init__.py
Normal file
1
utils/database/database.py
Normal file
1
utils/database/database.py
Normal file
@ -0,0 +1 @@
|
|||||||
|
from simplesqlite import SimpleSQLite
|
Loading…
Reference in New Issue
Block a user