#!/bin/bash
DIR="$(cd "$(dirname "$0")" && pwd)"
cd "$DIR"

if [ ! -f "feishu_config.json" ]; then
    echo "[ERROR] feishu_config.json not found!"
    exit 1
fi

echo "Starting server..."
if command -v python3 &> /dev/null; then
    python3 server.py
elif command -v python &> /dev/null; then
    python server.py
else
    echo "[ERROR] Python not found! Please install Python 3."
    exit 1
fi
