Files
Aether/dev.sh

21 lines
563 B
Bash
Raw Permalink Normal View History

2025-12-10 20:52:44 +08:00
#!/bin/bash
# 本地开发启动脚本
clear
# 加载 .env 文件
set -a
source .env
set +a
# 构建 DATABASE_URL
export DATABASE_URL="postgresql://${DB_USER:-postgres}:${DB_PASSWORD}@${DB_HOST:-localhost}:${DB_PORT:-5432}/${DB_NAME:-aether}"
export REDIS_URL=redis://:${REDIS_PASSWORD}@${REDIS_HOST:-localhost}:${REDIS_PORT:-6379}/0
2025-12-10 20:52:44 +08:00
# 启动 uvicorn热重载模式
echo "🚀 启动本地开发服务器..."
echo "📍 后端地址: http://localhost:8084"
echo "📊 数据库: ${DATABASE_URL}"
echo ""
uv run uvicorn src.main:app --reload --port 8084