1
0
Files
card/start_server.sh
syui 0b34568585 Add complete ai.card Rust implementation
- Implement complete Rust API server with axum framework
- Add database abstraction supporting PostgreSQL and SQLite
- Implement comprehensive gacha system with probability calculations
- Add JWT authentication with atproto DID integration
- Create card master data system with rarities (Normal, Rare, SuperRare, Kira, Unique)
- Implement draw history tracking and collection management
- Add API endpoints for authentication, card drawing, and collection viewing
- Include database migrations for both PostgreSQL and SQLite
- Maintain full compatibility with Python API implementation
- Add comprehensive documentation and development guide

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-06-09 01:51:15 +09:00

43 lines
1.0 KiB
Bash
Executable File

#!/bin/bash
set -e
# ai.card MCP server startup script
# Configuration
CARD_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
API_DIR="$CARD_DIR/python/api"
VENV_DIR="$HOME/.config/syui/ai/card/venv"
PYTHON="$VENV_DIR/bin/python"
# Default settings
HOST="${HOST:-localhost}"
PORT="${PORT:-8001}"
RELOAD="${RELOAD:-true}"
echo "🎴 Starting ai.card MCP Server"
echo "================================"
echo "Directory: $API_DIR"
echo "Python: $PYTHON"
echo "Host: $HOST"
echo "Port: $PORT"
echo "Reload: $RELOAD"
echo
# Check virtual environment
if [ ! -f "$PYTHON" ]; then
echo "❌ Error: Virtual environment not found at $VENV_DIR"
echo "Please run ./setup_venv.sh first"
exit 1
fi
# Change to API directory
cd "$API_DIR"
# Start server
if [ "$RELOAD" = "true" ]; then
echo "🚀 Starting server with auto-reload..."
exec "$PYTHON" -m uvicorn app.main:app --host "$HOST" --port "$PORT" --reload
else
echo "🚀 Starting server..."
exec "$PYTHON" -m uvicorn app.main:app --host "$HOST" --port "$PORT"
fi