Enhance README with CLI room checking instructions and implement room name resolution in command handling. Updated handle_init_command and handle_join_command to use resolved room names, improving room access validation. Added CLI command handling in main.rs to list available rooms from the database or fallback configuration.
This commit is contained in:
18
README.md
18
README.md
@@ -108,6 +108,24 @@ In `YourPart3/backend/config/chatBridge.json` sollte stehen:
|
||||
|
||||
Dann verbindet sich die bestehende Bridge (`chatTcpBridge.js`) direkt mit `yourchat2`.
|
||||
|
||||
## Raeume per CLI pruefen
|
||||
|
||||
Die Raumdefinitionen kommen aus `chat.room` (bei gesetztem `CHAT_DB_URL`).
|
||||
Ohne DB-Verbindung gibt es einen Fallback mit `lobby`.
|
||||
|
||||
Pruefen auf Kommandozeile:
|
||||
|
||||
```bash
|
||||
cd /home/tsschulz/Programs/yourchat2
|
||||
CHAT_DB_URL='postgres://user:pass@host:5432/dbname' ./target/release/yourchat2 --list-rooms
|
||||
```
|
||||
|
||||
Wenn der Service ueber systemd laeuft und die Variablen in `/etc/yourchat2/yourchat2.env` stehen:
|
||||
|
||||
```bash
|
||||
sudo -u tsschulz bash -lc 'set -a; source /etc/yourchat2/yourchat2.env; set +a; /usr/local/bin/yourchat2 --list-rooms'
|
||||
```
|
||||
|
||||
## Systemd (optional)
|
||||
|
||||
Es liegt eine Produktions-nahe Unit-Datei `yourchat2.service` im Projekt.
|
||||
|
||||
Reference in New Issue
Block a user