build(ports): 本地开发改用 7380/7381 避开端口冲突
This commit is contained in:
1 parent
acef92c797
commit
07e73715ac
1 file changed
+5
-1
@@ -103,9 +103,11 @@ $dataDirLiteral = ConvertTo-PowerShellLiteral $dataDir
|
|||||||
$backendCommand = @"
|
$backendCommand = @"
|
||||||
`$ErrorActionPreference = 'Stop'
|
`$ErrorActionPreference = 'Stop'
|
||||||
Set-Location -LiteralPath $backendDirLiteral
|
Set-Location -LiteralPath $backendDirLiteral
|
||||||
|
`$env:CANVAS_BACKEND_ADDR = '127.0.0.1:7381'
|
||||||
|
`$env:CANVAS_BACKEND_DATA_DIR = $dataDirLiteral
|
||||||
`$env:GOCACHE = $(ConvertTo-PowerShellLiteral $goBuildCache)
|
`$env:GOCACHE = $(ConvertTo-PowerShellLiteral $goBuildCache)
|
||||||
`$env:GOMODCACHE = $(ConvertTo-PowerShellLiteral $goModuleCache)
|
`$env:GOMODCACHE = $(ConvertTo-PowerShellLiteral $goModuleCache)
|
||||||
Write-Host "影策后端:$($env:CANVAS_BACKEND_ADDR)" -ForegroundColor Cyan
|
Write-Host '影策后端:http://127.0.0.1:7381' -ForegroundColor Cyan
|
||||||
go run ./cmd/server
|
go run ./cmd/server
|
||||||
"@
|
"@
|
||||||
|
|
||||||
@@ -114,6 +116,8 @@ $webCommand = @"
|
|||||||
Set-Location -LiteralPath $webDirLiteral
|
Set-Location -LiteralPath $webDirLiteral
|
||||||
`$env:VITE_API_PROXY_TARGET = 'http://127.0.0.1:7381'
|
`$env:VITE_API_PROXY_TARGET = 'http://127.0.0.1:7381'
|
||||||
Write-Host '影策前端:http://localhost:7380' -ForegroundColor Cyan
|
Write-Host '影策前端:http://localhost:7380' -ForegroundColor Cyan
|
||||||
|
`$env:VITE_API_PROXY_TARGET = 'http://127.0.0.1:7381'
|
||||||
|
Write-Host '影策前端:http://localhost:7380' -ForegroundColor Cyan
|
||||||
bun run dev
|
bun run dev
|
||||||
"@
|
"@
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user