TransHub / setup.sh
linguabot's picture
Upload folder using huggingface_hub
4f163ba verified
#!/bin/bash
echo "πŸš€ Setting up Transcreation Sandbox..."
# Check if Node.js is installed
if ! command -v node &> /dev/null; then
echo "❌ Node.js is not installed. Please install Node.js (v16 or higher) first."
exit 1
fi
# Check if npm is installed
if ! command -v npm &> /dev/null; then
echo "❌ npm is not installed. Please install npm first."
exit 1
fi
echo "βœ… Node.js and npm are installed"
# Install root dependencies
echo "πŸ“¦ Installing root dependencies..."
npm install
# Install server dependencies
echo "πŸ“¦ Installing server dependencies..."
cd server && npm install && cd ..
# Install client dependencies
echo "πŸ“¦ Installing client dependencies..."
cd client && npm install && cd ..
# Create .env file if it doesn't exist
if [ ! -f "server/.env" ]; then
echo "πŸ“ Creating .env file..."
cp server/.env.example server/.env
echo "βœ… Created server/.env file. Please update it with your configuration."
fi
echo ""
echo "πŸŽ‰ Setup complete!"
echo ""
echo "To start the development servers:"
echo " npm run dev"
echo ""
echo "Or start them separately:"
echo " # Terminal 1: Backend server"
echo " cd server && npm run dev"
echo ""
echo " # Terminal 2: Frontend server"
echo " cd client && npm start"
echo ""
echo "Make sure MongoDB is running on localhost:27017"
echo "The application will be available at http://localhost:3000"