67 lines
1.5 KiB
Bash
67 lines
1.5 KiB
Bash
#!/bin/bash
|
|
|
|
# Quick setup script for Secure Proxy
|
|
|
|
echo "🚀 Setting up Secure Proxy OIDC..."
|
|
echo ""
|
|
|
|
# Check if Node.js is installed
|
|
if ! command -v node &> /dev/null; then
|
|
echo "❌ Node.js is not installed. Please install Node.js 16+ first."
|
|
exit 1
|
|
fi
|
|
|
|
echo "✓ Node.js version: $(node --version)"
|
|
echo ""
|
|
|
|
# Install dependencies
|
|
echo "📦 Installing dependencies..."
|
|
npm install
|
|
|
|
if [ $? -ne 0 ]; then
|
|
echo "❌ npm install failed"
|
|
exit 1
|
|
fi
|
|
|
|
echo ""
|
|
echo "✓ Dependencies installed"
|
|
echo ""
|
|
|
|
# Initialize database
|
|
echo "🗄️ Initializing database..."
|
|
npm run init-db
|
|
|
|
if [ $? -ne 0 ]; then
|
|
echo "❌ Database initialization failed"
|
|
exit 1
|
|
fi
|
|
|
|
echo ""
|
|
echo "✓ Database initialized"
|
|
echo ""
|
|
|
|
# Done
|
|
echo "════════════════════════════════════════════════════════"
|
|
echo "✅ Setup complete!"
|
|
echo ""
|
|
echo "📝 Next steps:"
|
|
echo ""
|
|
echo " 1. Start the server:"
|
|
echo " npm run dev"
|
|
echo ""
|
|
echo " 2. Open in browser:"
|
|
echo " http://localhost:3000"
|
|
echo ""
|
|
echo " 3. Access admin panel:"
|
|
echo " http://localhost:3000/admin"
|
|
echo ""
|
|
echo "🔑 Admin credentials (from .env):"
|
|
echo " Email: admin@example.com"
|
|
echo " Password: changeme"
|
|
echo ""
|
|
echo "📖 Documentation:"
|
|
echo " - Read: 00-START-HERE.md"
|
|
echo " - Or: QUICKSTART.md"
|
|
echo ""
|
|
echo "════════════════════════════════════════════════════════"
|