Files
vf_react/check-env.sh
2025-11-22 09:16:12 +08:00

35 lines
795 B
Bash
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

#!/bin/bash
cd /home/ubuntu/vf_react/src/views/AgentChat/neuratalk
echo "========================================="
echo "检查并修复环境配置"
echo "========================================="
# 1. 创建正确的 .env.local
echo "创建 .env.local 文件..."
cat > .env.local << 'EOF'
# API 配置 - 重要!必须设置
NEXT_PUBLIC_API_URL=http://49.232.185.254:5001
NEXT_PUBLIC_MAIN_APP_URL=https://valuefrontier.cn
# Session 配置
SESSION_COOKIE_NAME=session
PORT=3000
EOF
echo "✓ 环境文件已创建"
echo ""
echo "内容:"
cat .env.local
echo ""
# 2. 检查文件是否存在
if [ -f ".env.local" ]; then
echo "✓ .env.local 文件存在"
else
echo "✗ .env.local 文件不存在"
fi
echo ""
echo "请重启 Next.js 服务器Ctrl+C 然后 npm run dev"