feat: migrate application port from 3000 to 4001 and fix circular dependencies
- Change default port to 4001 across all configuration files (server.js, docker-compose.yml, .env, Dockerfile) - Update frontend API URL to use new port 4001 - Fix circular dependency issues in route files by using process.env.SERVER_DIR instead of importing from server.js - Apply to all routes: auth.js, backup.js, logs.js, players.js, rcon.js, server.js, whitelist.js - Fix environment variable loading in start.sh to properly handle paths with spaces - Quote SERVER_DIR path in .env to preserve spaces in directory paths - Update all documentation references from port 3000 to 4001 (README, QUICKSTART, CONFIGURATION, INDEX) - Remove debug console.log statements from auth.js - Remove test utility file test-ops.js Fixes: Port conflict issues, circular dependency warnings, environment variable parsing
This commit is contained in:
@@ -81,8 +81,7 @@ Ouvrez `backend/.env` avec votre éditeur préféré:
|
||||
# Mode d'exécution
|
||||
NODE_ENV=development
|
||||
|
||||
# Port de l'application (8080, 3000, etc.)
|
||||
PORT=3000
|
||||
PORT=4001
|
||||
|
||||
# Clé de session (générer une clé aléatoire forte)
|
||||
SESSION_SECRET=abc123def456ghi789jkl012mno345pqr
|
||||
@@ -113,7 +112,7 @@ chmod +x start.sh
|
||||
|
||||
Vous devriez voir:
|
||||
```
|
||||
🚀 Backend Admin NationsGlory démarré sur http://localhost:3000
|
||||
🚀 Backend Admin NationsGlory démarré sur http://localhost:4001
|
||||
📁 Répertoire du serveur: /home/innotex/Documents/Projet/Serveur NationsGlory/NationsGlory_ServeurBuild_Red
|
||||
```
|
||||
|
||||
@@ -193,7 +192,7 @@ Si ça marche, RCON est correctement configuré! ✓
|
||||
2. Attendez que le serveur se redémarre ou recharge les OPs
|
||||
3. Réessayez l'enregistrement
|
||||
|
||||
### Problème: "Impossible de se connecter à localhost:3000"
|
||||
### Problème: "Impossible de se connecter à localhost:4001"
|
||||
|
||||
**Cause**: L'application n'est pas lancée ou sur le mauvais port
|
||||
|
||||
|
||||
Reference in New Issue
Block a user