forked from foru17/neko-master
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathstart.sh
More file actions
executable file
·53 lines (43 loc) · 1.62 KB
/
Copy pathstart.sh
File metadata and controls
executable file
·53 lines (43 loc) · 1.62 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
#!/bin/bash
# Clash Master 启动脚本
set -e
echo "╔════════════════════════════════════════════════════════╗"
echo "║ OpenClash Traffic Statistics System ║"
echo "╚════════════════════════════════════════════════════════╝"
echo
# 颜色定义
RED='\033[0;31m'
GREEN='\033[0;32m'
YELLOW='\033[1;33m'
BLUE='\033[0;34m'
NC='\033[0m' # No Color
# 检查 pnpm
if ! command -v pnpm &> /dev/null; then
echo -e "${RED}Error: pnpm is not installed${NC}"
echo "Please install pnpm first: npm install -g pnpm"
exit 1
fi
# 安装依赖
echo -e "${BLUE}[1/3] Installing dependencies...${NC}"
pnpm install
# 检查环境变量
echo
echo -e "${BLUE}[2/3] Checking environment configuration...${NC}"
if [ ! -f "apps/collector/.env" ]; then
echo -e "${YELLOW}Warning: .env file not found in apps/collector/${NC}"
echo "Creating from template..."
cp apps/collector/.env.example apps/collector/.env
echo -e "${YELLOW}Please edit apps/collector/.env with your OpenClash configuration${NC}"
exit 1
fi
echo -e "${GREEN}✓ Environment configured${NC}"
# 启动服务
echo
echo -e "${BLUE}[3/3] Starting services...${NC}"
echo -e "${GREEN} • Collector will run on http://localhost:3001${NC}"
echo -e "${GREEN} • Web UI will run on http://localhost:3000${NC}"
echo
echo -e "${YELLOW}Press Ctrl+C to stop all services${NC}"
echo
# 使用 turborepo 启动所有服务
pnpm dev