first commit
This commit is contained in:
27
go_backend/start_prod.bat
Normal file
27
go_backend/start_prod.bat
Normal file
@@ -0,0 +1,27 @@
|
||||
@echo off
|
||||
chcp 65001 >nul
|
||||
echo 启动AI小红书后端服务(生产环境)...
|
||||
|
||||
:: 检查go环境
|
||||
where go >nul 2>nul
|
||||
if %ERRORLEVEL% neq 0 (
|
||||
echo 错误: 未检测到Go环境,请先安装Go
|
||||
pause
|
||||
exit /b 1
|
||||
)
|
||||
|
||||
:: 编译项目
|
||||
echo 编译项目...
|
||||
go build -o ai_xhs.exe main.go
|
||||
|
||||
if %ERRORLEVEL% neq 0 (
|
||||
echo 编译失败
|
||||
pause
|
||||
exit /b 1
|
||||
)
|
||||
|
||||
:: 启动服务
|
||||
echo 启动生产环境服务...
|
||||
ai_xhs.exe -env=prod
|
||||
|
||||
pause
|
||||
Reference in New Issue
Block a user