README, config file

This commit is contained in:
2026-07-23 23:48:05 -07:00
parent 504794f9a8
commit 05e70a7fc4
7 changed files with 150 additions and 36 deletions
+8 -4
View File
@@ -10,11 +10,14 @@ from starlette.middleware.cors import CORSMiddleware
from mcp_logic import MCPServer
from tools import TOOL_REGISTRY
import config
# --- Configuration & Logging ---
logging.basicConfig(
level=logging.DEBUG,
filename="debug.log",
level=getattr(logging, config.LOG_LEVEL),
filename=config.LOG_FILE,
filemode="a",
format="%(asctime)s - %(levelname)s - %(message)s"
)
@@ -90,11 +93,12 @@ app.add_middleware(
if __name__ == "__main__":
config = uvicorn.Config(
app=app,
host="127.0.0.1",
port=8000,
host=config.HOST,
port=config.PORT,
log_level="info",
timeout_graceful_shutdown=2 # Reduced from 5 to 2 seconds
)
server = uvicorn.Server(config)
def signal_handler(sig, frame):