#!/bin/bash # Build and serve UserWallet on port 3018 (production). # Usage: ./start.sh # Ensure a web service responds for Certbot / proxy (userwallet.certificator.4nkweb.com -> .105:3018). set -e cd "$(dirname "$0")" export PORT=${PORT:-3018} if [ ! -d node_modules ]; then echo "Installation des dépendances..." npm install fi echo "Build du frontend UserWallet..." npm run build echo "Démarrage du serveur sur le port $PORT..." exec npx vite preview --port "$PORT" --host 0.0.0.0