Spaces:
Runtime error
Runtime error
:pencil: [Configs] Set app envs with name, port and host
Browse files- configs/__init__.py +0 -0
- configs/envs.json +8 -0
- configs/envs.py +9 -0
configs/__init__.py
ADDED
File without changes
|
configs/envs.json
ADDED
@@ -0,0 +1,8 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"data_proxy_app": {
|
3 |
+
"app_name": "Data Proxy App",
|
4 |
+
"host": "0.0.0.0",
|
5 |
+
"port": 22001,
|
6 |
+
"version": "0.1"
|
7 |
+
}
|
8 |
+
}
|
configs/envs.py
ADDED
@@ -0,0 +1,9 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
from pathlib import Path
|
2 |
+
|
3 |
+
from tclogger import OSEnver
|
4 |
+
|
5 |
+
configs_root = Path(__file__).parents[1] / "configs"
|
6 |
+
envs_path = configs_root / "envs.json"
|
7 |
+
|
8 |
+
ENVS_ENVER = OSEnver(envs_path)
|
9 |
+
DATA_PROXY_APP_ENVS = ENVS_ENVER["data_proxy_app"]
|