-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathstart-cat-planner.command
More file actions
executable file
·44 lines (34 loc) · 931 Bytes
/
start-cat-planner.command
File metadata and controls
executable file
·44 lines (34 loc) · 931 Bytes
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
#!/bin/bash
# CAT 2026 Study Planner - Local Launcher
# Double-click this file to start the app
cd "$(dirname "$0")"
PORT=3456
# Check if already running
if lsof -i :$PORT -sTCP:LISTEN >/dev/null 2>&1; then
echo "CAT Study Planner is already running!"
open "http://localhost:$PORT"
exit 0
fi
echo "==============================="
echo " CAT 2026 Study Planner"
echo " Starting on port $PORT..."
echo "==============================="
echo ""
# Install deps if needed
if [ ! -d "node_modules" ]; then
echo "Installing dependencies (first time only)..."
npm install
echo ""
fi
# Build if no .next folder
if [ ! -d ".next" ]; then
echo "Building app (first time only)..."
npm run build
echo ""
fi
# Open browser after a short delay
(sleep 2 && open "http://localhost:$PORT") &
echo "Starting server... (press Ctrl+C to stop)"
echo ""
# Start the production server
PORT=$PORT npm start