Production ready
This commit is contained in:
35
README.md
35
README.md
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user