Spaces:
Sleeping
Sleeping
| 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" |