Page MenuHomeDevCentral

D3968.id10282.diff
No OneTemporary

D3968.id10282.diff

diff --git a/README.md b/README.md
--- a/README.md
+++ b/README.md
@@ -223,11 +223,15 @@
docker compose -f docker-compose.yml -f docker-compose.prod.yml up -d
```
4. Generate an admin JWT token:
- ```bash
- docker compose exec backend node -e "const {generateToken} = require('./middleware/auth.js'); console.log(generateToken({role:'admin'}))"
- ```
+ ```bash
+ docker compose exec backend node -e "const {generateToken} = require('./middleware/auth.js'); console.log(generateToken({role:'admin'}))"
+ ```
5. Use the token to log into the admin dashboard at `/admin/login`
+> **Note:** Tokens are signed with `JWT_SECRET`. Changing the secret invalidates
+> all existing tokens — you must generate a new one. After changing `JWT_SECRET`,
+> recreate the containers with `docker compose down && docker compose up -d`.
+
### Reverse Proxy (Nginx)
For production, place Nginx in front to serve the frontend and proxy API requests:
diff --git a/backend/README.md b/backend/README.md
--- a/backend/README.md
+++ b/backend/README.md
@@ -90,6 +90,11 @@
The token is valid for 24 hours by default.
+> **Important:** Tokens are signed with `JWT_SECRET`. If you change the secret
+> in your `.env`, all previously generated tokens become invalid and you must
+> generate a new one. After changing `JWT_SECRET`, recreate the containers with
+> `docker compose down && docker compose up -d` to apply the new value.
+
### Using the token
1. Copy the generated token
diff --git a/backend/config/app.json b/backend/config/app.json
--- a/backend/config/app.json
+++ b/backend/config/app.json
@@ -1,6 +1,6 @@
{
"navbar": {
- "title": "Codrlabs Uptime",
+ "title": "ServPulse",
"buttons_left": [
{
"name": "DevCentral",

File Metadata

Mime Type
text/plain
Expires
Tue, Feb 17, 08:17 (10 h, 41 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
3454797
Default Alt Text
D3968.id10282.diff (1 KB)

Event Timeline