feat: 统一应用配置和内容过滤规则

This commit is contained in:
chuan
2026-08-10 15:33:12 +08:00
parent f6e5c1ceca
commit 9f0911c596
16 changed files with 226 additions and 98 deletions
+5 -9
View File
@@ -29,14 +29,10 @@ if not exist "%LIBCLANG_PATH%\libclang.dll" (
exit /b 1
)
if not exist "%PROJECT_ROOT%\dht-search.toml" (
echo [INFO] Creating local configuration from template
copy /Y "%PROJECT_ROOT%\dht-search.example.toml" "%PROJECT_ROOT%\dht-search.toml" >nul
if errorlevel 1 (
echo [ERROR] Failed to create dht-search.toml
pause
exit /b 1
)
if not exist "%PROJECT_ROOT%\config.toml" (
echo [ERROR] config.toml was not found
pause
exit /b 1
)
if not exist "%WEB_DIR%\node_modules" (
@@ -70,7 +66,7 @@ powershell -NoProfile -ExecutionPolicy Bypass -Command ^
" }" ^
"}" ^
"try {" ^
" $backend = Start-Process -FilePath 'cargo' -ArgumentList @('run','-p','dht-search','--bin','dht-search','--','--config','dht-search.toml') -WorkingDirectory $env:PROJECT_ROOT -NoNewWindow -PassThru;" ^
" $backend = Start-Process -FilePath 'cargo' -ArgumentList @('run','-p','dht-search','--bin','dht-search','--','--config','config.toml') -WorkingDirectory $env:PROJECT_ROOT -NoNewWindow -PassThru;" ^
" $web = Start-Process -FilePath 'bun' -ArgumentList @('--bun','run','dev','--','--host','127.0.0.1') -WorkingDirectory $env:WEB_DIR -NoNewWindow -PassThru;" ^
" while (-not $backend.HasExited -and -not $web.HasExited) { Start-Sleep -Milliseconds 250 }" ^
"} finally {" ^