chore: 初始化仓库,排除二进制文件和覆盖率文件
Some checks failed
SonarQube Analysis / sonarqube (push) Has been cancelled
Test / test (push) Has been cancelled
Test / lint (push) Has been cancelled
Test / build (push) Has been cancelled

This commit is contained in:
lan
2025-11-28 23:30:49 +08:00
commit 4b4980820f
107 changed files with 20755 additions and 0 deletions

42
run.bat Normal file
View File

@@ -0,0 +1,42 @@
@echo off
chcp 65001 >nul
echo ================================
echo CarrotSkin Backend Server
echo ================================
echo.
echo [1/3] Checking swag tool...
where swag >nul 2>nul
if %ERRORLEVEL% NEQ 0 (
echo [WARN] swag tool not found, installing...
go install github.com/swaggo/swag/cmd/swag@latest
if %ERRORLEVEL% NEQ 0 (
echo [ERROR] Failed to install swag
echo Please install manually: go install github.com/swaggo/swag/cmd/swag@latest
pause
exit /b 1
)
echo [OK] swag tool installed
) else (
echo [OK] swag tool found
)
echo.
echo [2/3] Generating Swagger documentation...
swag init -g cmd/server/main.go -o docs --parseDependency --parseInternal
if %ERRORLEVEL% NEQ 0 (
echo [ERROR] Failed to generate Swagger docs
pause
exit /b 1
)
echo [OK] Swagger docs generated
echo.
echo [3/3] Starting server...
echo Server: http://localhost:8080
echo Swagger: http://localhost:8080/swagger/index.html
echo Health: http://localhost:8080/health
echo.
echo Press Ctrl+C to stop server
echo.
go run cmd/server/main.go