- docs/01 需求规格说明书:FR-01~FR-20 + NFR-01~NFR-10 - docs/02 概要设计:分层架构、模块清单、关键决策(含不引入数据库的理由) - include/shs/ 17 个头文件接口冻结(tools/header_check.sh 全通过) - README:快速开始、命令参考、网页接口一览、知识点索引 - scripts:build/test/run_cli/run_web/demo.txt/acceptance.sh - .idea 运行配置 5 个(CLI/网页/回放/测试/详细测试)
10 lines
353 B
Bash
Executable File
10 lines
353 B
Bash
Executable File
#!/usr/bin/env bash
|
||
# 网页模式:bash scripts/run_web.sh [端口,默认 8080]
|
||
set -euo pipefail
|
||
cd "$(dirname "$0")/.."
|
||
PRESET="${PRESET:-debug}"
|
||
PORT="${1:-8080}"
|
||
cmake --build --preset "$PRESET" >/dev/null
|
||
echo "浏览器打开: http://127.0.0.1:$PORT/ (Ctrl+C 结束)"
|
||
exec "./build/$PRESET/smart_home" --web --port "$PORT" --data data
|