-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathrun-server.sh
More file actions
31 lines (25 loc) · 835 Bytes
/
run-server.sh
File metadata and controls
31 lines (25 loc) · 835 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
#!/bin/bash
# buu.fun MCP Server Run Script
echo "Starting Buu MCP Server..."
# Check if the dist directory exists, if not, build the project
if [ ! -d "./dist" ]; then
echo "Dist directory not found. Building project..."
npm run build
fi
# Check if BUU_TEAM_API_KEY is set
if [ -z "$BUU_TEAM_API_KEY" ]; then
# Try to load from .env file
if [ -f ".env" ]; then
export $(grep -v '^#' .env | xargs)
fi
# Check again if BUU_TEAM_API_KEY is set
if [ -z "$BUU_TEAM_API_KEY" ]; then
echo "Error: BUU_TEAM_API_KEY environment variable not set."
echo "Please set your API key using: export BUU_TEAM_API_KEY=your_api_key"
echo "Or create a .env file with BUU_TEAM_API_KEY=your_api_key"
exit 1
fi
fi
# Run the server
echo "Running server..."
node dist/index.js