- param(
- [int]$Port = 8099
- )
- $ErrorActionPreference = 'Stop'
- $here = Split-Path -Parent $MyInvocation.MyCommand.Path
- $node = Get-Command node -ErrorAction SilentlyContinue
- if (-not $node) {
- throw '未找到 node,请先安装 Node.js 或把 node 加入 PATH。'
- }
- Write-Host "启动代码对比工具: http://127.0.0.1:$Port"
- Write-Host '按 Ctrl+C 结束。'
- & $node.Source (Join-Path $here 'server.mjs') $Port
|