1.9 KiB
1.9 KiB
🚀 Quick Start Guide
5 Minutes Setup (Development)
# 1. Installer les dépendances
npm install
# 2. Initialiser la base de données
npm run init-db
# 3. Démarrer le serveur
npm run dev
# 4. Accéder à l'application
# http://localhost:3000
Ajouter votre premier service
- Ouvrir http://localhost:3000/admin
- Cliquer + New Service
- Remplir le formulaire :
Name: Mon App Path: /myapp Target URL: http://localhost:8080 Require Auth: ✓ - Cliquer Create Service
Tester le proxy
# Service accessible via proxy
http://localhost:3000/myapp
# Redirige vers → http://localhost:8080
Fichiers Clés
| Fichier | Description |
|---|---|
src/server.js |
Serveur principal Express |
src/middleware/oidcMiddleware.js |
Authentification OIDC |
src/middleware/proxyMiddleware.js |
Logique du reverse proxy |
src/services/serviceManager.js |
Gestion des services |
public/admin.html |
Interface admin |
.env |
Configuration |
Options Avancées
- Keycloak : Voir
INSTALLATION.md - Docker :
docker-compose up - Production :
NODE_ENV=production - Logs :
LOG_LEVEL=debug
URLs Importantes
- Home : http://localhost:3000/
- Admin Panel : http://localhost:3000/admin
- API : http://localhost:3000/api/services
Besoin d'aide ?
- Lire
README.mdpour la documentation complète - Consulter
INSTALLATION.mdpour Keycloak et déploiement - Vérifier les logs :
npm run devaffiche tout
Exemple Real-World
# Terminal 1 : Grafana sur 3001
docker run -p 3001:3000 grafana/grafana
# Terminal 2 : Proxy sur 3000
npm run dev
# Terminal 3 : Accéder
# http://localhost:3000/admin → Ajouter service
# Name: Grafana, Path: /grafana, Target: http://localhost:3001
# Puis : http://localhost:3000/grafana
C'est tout ! Le service est opérationnel 🎉