-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathsetup-dev.sh
More file actions
executable file
·51 lines (40 loc) · 1.29 KB
/
setup-dev.sh
File metadata and controls
executable file
·51 lines (40 loc) · 1.29 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
#!/bin/bash
# Development setup script for timetracker-ui
set -e
echo "🚀 Setting up timetracker-ui for development..."
# Check Node version
NODE_VERSION=$(node -v | cut -d'v' -f2 | cut -d'.' -f1)
if [ "$NODE_VERSION" -lt 22 ]; then
echo "⚠️ Warning: Node $NODE_VERSION detected. This project requires Node 22+ (LTS)."
echo " Run 'nvm use 22' to switch to the correct version."
exit 1
fi
echo "✅ Node $(node -v) detected"
# Check if pnpm is installed
if ! command -v pnpm &> /dev/null; then
echo "📦 Installing pnpm..."
npm install -g pnpm
fi
echo "✅ pnpm $(pnpm -v) detected"
# Install dependencies
echo "📦 Installing dependencies with pnpm..."
pnpm install
# Create config.json if it doesn't exist
if [ ! -f "static/config.json" ]; then
echo "📝 Creating static/config.json from template..."
cp static/config.json.dist static/config.json
echo "✅ Created static/config.json (you can customize this file)"
else
echo "✅ static/config.json already exists"
fi
# Install proxy service dependencies
echo "📦 Installing proxy service dependencies..."
cd srv && pnpm install
cd ..
echo ""
echo "✅ Setup complete! You can now run:"
echo ""
echo " TIMETRACKER_URL=https://tt.netresearch.de/ pnpm dev"
echo ""
echo " The dev server will start on http://0.0.0.0:8080"
echo ""