Production ready

This commit is contained in:
2026-02-09 22:31:22 +01:00
parent fd6e7c44e1
commit 7814548e11
82 changed files with 3390 additions and 2026 deletions

View File

@@ -96,20 +96,35 @@ npm run migrate
### Backend (.env)
```env
PORT=3001
DATABASE_URL=postgresql://admin:admin123@localhost:5432/website_monitor
REDIS_URL=redis://localhost:6379
JWT_SECRET=your-secret-key
SMTP_HOST=smtp.sendgrid.net
SMTP_PORT=587
SMTP_USER=apikey
SMTP_PASS=your-api-key
PORT=3001
DATABASE_URL=postgresql://admin:admin123@localhost:5432/website_monitor
REDIS_URL=redis://localhost:6379
JWT_SECRET=your-secret-key
SMTP_HOST=smtp.sendgrid.net
SMTP_PORT=587
SMTP_USER=apikey
SMTP_PASS=your-api-key
LANDING_ONLY_MODE=false
ADMIN_PASSWORD=change-me-for-admin-waitlist
```
### Frontend (.env.local)
```env
NEXT_PUBLIC_API_URL=http://localhost:3001
```
NEXT_PUBLIC_API_URL=http://localhost:3001
NEXT_PUBLIC_LANDING_ONLY_MODE=false
```
### Landing-only mode (Waitlist rollout)
To expose only landing pages and waitlist APIs, enable both flags:
- Backend `.env`: `LANDING_ONLY_MODE=true`
- Frontend `.env.local`: `NEXT_PUBLIC_LANDING_ONLY_MODE=true`
When enabled:
- Public pages: `/`, `/blog`, `/privacy`, `/admin`
- All other frontend routes redirect to `/` with HTTP `307`
- Backend only allows `/api/waitlist/*`, `POST /api/tools/meta-preview`, and `/health`
## 📖 Usage