-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsetup.sh
More file actions
54 lines (43 loc) Β· 1.05 KB
/
setup.sh
File metadata and controls
54 lines (43 loc) Β· 1.05 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
54
#!/bin/bash
echo "π Memory Leak Analyzer Setup"
echo "=============================="
echo ""
# Check Node.js
if ! command -v node &> /dev/null; then
echo "β Node.js is not installed. Please install Node.js 18+"
exit 1
fi
NODE_VERSION=$(node -v)
echo "β Node.js installed: $NODE_VERSION"
# Check npm
if ! command -v npm &> /dev/null; then
echo "β npm is not installed"
exit 1
fi
NPM_VERSION=$(npm -v)
echo "β npm installed: $NPM_VERSION"
# Install dependencies
echo ""
echo "π¦ Installing dependencies..."
npm install
if [ $? -ne 0 ]; then
echo "β Failed to install dependencies"
exit 1
fi
echo "β Dependencies installed"
# Setup .env file
echo ""
echo "π Setting up environment..."
if [ ! -f backend/.env ]; then
cp backend/.env.example backend/.env
echo "β Created backend/.env"
echo "β Created backend/.env"
else
echo "β backend/.env already exists"
fi
echo ""
echo "β
Setup complete!"
echo ""
echo "Next steps:"
echo "1. Run: npm run dev"
echo "2. Open http://localhost:3000 in your browser"