57 lines
1.1 KiB
Bash
57 lines
1.1 KiB
Bash
#!/bin/bash
|
|
|
|
# Personotes - Startup Script
|
|
# Ce script construit le frontend et démarre le serveur
|
|
|
|
set -e # Exit on error
|
|
|
|
echo "🚀 Personotes Startup"
|
|
echo "===================="
|
|
echo ""
|
|
|
|
# Check if npm is installed
|
|
if ! command -v npm &> /dev/null; then
|
|
echo "❌ npm n'est pas installé"
|
|
echo " Installez Node.js depuis https://nodejs.org/"
|
|
exit 1
|
|
fi
|
|
|
|
# Check if go is installed
|
|
if ! command -v go &> /dev/null; then
|
|
echo "❌ Go n'est pas installé"
|
|
echo " Installez Go depuis https://go.dev/doc/install"
|
|
exit 1
|
|
fi
|
|
|
|
# Build frontend
|
|
echo "📦 Building frontend..."
|
|
cd frontend
|
|
|
|
if [ ! -d "node_modules" ]; then
|
|
echo " Installing dependencies..."
|
|
npm install
|
|
fi
|
|
|
|
echo " Compiling JavaScript modules..."
|
|
npm run build
|
|
|
|
cd ..
|
|
|
|
echo "✅ Frontend built successfully"
|
|
echo ""
|
|
|
|
# Start server
|
|
echo "🔥 Starting server..."
|
|
echo " Server will be available at: http://localhost:8080"
|
|
echo ""
|
|
echo " Available languages:"
|
|
echo " - 🇬🇧 English (EN)"
|
|
echo " - 🇫🇷 Français (FR)"
|
|
echo ""
|
|
echo " Change language: Settings > Autre"
|
|
echo ""
|
|
echo " Press Ctrl+C to stop"
|
|
echo ""
|
|
|
|
go run ./cmd/server
|