2025-05-24 05:12:51 +02:00

31 lines
821 B
Bash

#!/bin/bash
# Activate virtual environment based on platform
if [ -d "venv" ]; then
if [ -f "venv/Scripts/activate" ]; then
# Windows with Git Bash
source venv/Scripts/activate
else
# Linux/macOS
source venv/bin/activate
fi
echo "Virtual environment activated"
else
echo "WARNING: Virtual environment not found!"
fi
# Set development environment variables
export ENVIRONMENT=development
export LOG_LEVEL=DEBUG
# Check for .env file and load it
if [ -f ".env" ]; then
echo "Loading environment variables from .env file"
export $(grep -v '^#' .env | xargs)
else
echo "WARNING: No .env file found. Using defaults or environment variables."
fi
# Start server in development mode with hot reloading
echo "Starting development server..."
uvicorn main:app --host 0.0.0.0 --port 8000 --reload