14 lines
408 B
PowerShell
14 lines
408 B
PowerShell
$ErrorActionPreference = 'Stop'
|
|
$root = Split-Path -Parent $MyInvocation.MyCommand.Path
|
|
$webRoot = Join-Path $root 'domain-web'
|
|
$nodeRoot = Join-Path $root 'domainCheck\tools\node-v20.19.4-win-x64'
|
|
$npm = Join-Path $nodeRoot 'npm.cmd'
|
|
|
|
if (-not (Test-Path $npm)) {
|
|
throw "未找到 npm 命令: $npm"
|
|
}
|
|
|
|
$env:PATH = "$nodeRoot;$env:PATH"
|
|
Set-Location $webRoot
|
|
& $npm run dev -- --host 0.0.0.0 --port 3200
|