mirror of
https://github.com/xinnan-tech/xiaozhi-esp32-server.git
synced 2026-11-29 05:09:46 +01:00
add: 部署文件
This commit is contained in:
parent
6fe03995c6
commit
fe43d824c5
2 changed files with 5 additions and 3 deletions
4
app.py
4
app.py
|
|
@ -1,8 +1,12 @@
|
|||
import asyncio
|
||||
import os
|
||||
from pathlib import Path
|
||||
|
||||
from config.logger import setup_logging
|
||||
from config.settings import load_config
|
||||
from core.server import WebSocketServer
|
||||
|
||||
os.environ["PROJECT_ROOT_PATH"] = str(Path(__file__).resolve().parent)
|
||||
|
||||
async def main():
|
||||
setup_logging() # 最先初始化日志
|
||||
|
|
|
|||
|
|
@ -6,9 +6,7 @@ import json
|
|||
|
||||
|
||||
def get_project_dir():
|
||||
projectName = 'xiaozhi-esp32-server'
|
||||
filePath = os.path.abspath(__file__)
|
||||
return filePath[:filePath.rfind('/' + projectName + '/') + len(projectName) + 2]
|
||||
return os.environ["PROJECT_ROOT_PATH"]
|
||||
|
||||
|
||||
def get_local_ip():
|
||||
|
|
|
|||
Loading…
Reference in a new issue