align PORT default: make optional with 4738, update README

- src/env.ts: remove required-PORT throw, default to '4738' when unset
- README.md: change documented default from 3000 to 4738

All other files (.env.template, Dockerfile, docker-compose.yml)
already use 4738 — no further changes needed.
This commit is contained in:
Agent 2026-09-14 13:14:05 -04:00
parent cfbb29cb96
commit 02dd5944c8
2 changed files with 3 additions and 3 deletions

View file

@ -42,7 +42,7 @@ Flotilla ──HTTP──▶ Mailship (PUT /subscription/email)
| `DEFAULT_RELAYS` | ✓ | Comma-separated list of default relays | | `DEFAULT_RELAYS` | ✓ | Comma-separated list of default relays |
| `INDEXER_RELAYS` | ✓ | Comma-separated list of indexer relays | | `INDEXER_RELAYS` | ✓ | Comma-separated list of indexer relays |
| `SEARCH_RELAYS` | ✓ | Comma-separated list of search relays | | `SEARCH_RELAYS` | ✓ | Comma-separated list of search relays |
| `PORT` | | Port to run on (default: 3000) | | `PORT` | | Port to run on (default: 4738) |
## API ## API

View file

@ -15,7 +15,7 @@ if (!process.env.SMTP_FROM) throw new Error('SMTP_FROM is not defined.')
if (!process.env.DEFAULT_RELAYS) throw new Error('DEFAULT_RELAYS is not defined.') if (!process.env.DEFAULT_RELAYS) throw new Error('DEFAULT_RELAYS is not defined.')
if (!process.env.INDEXER_RELAYS) throw new Error('INDEXER_RELAYS is not defined.') if (!process.env.INDEXER_RELAYS) throw new Error('INDEXER_RELAYS is not defined.')
if (!process.env.SEARCH_RELAYS) throw new Error('SEARCH_RELAYS is not defined.') if (!process.env.SEARCH_RELAYS) throw new Error('SEARCH_RELAYS is not defined.')
if (!process.env.PORT) throw new Error('PORT is not defined.') if (!process.env.PORT) console.log('PORT not set, defaulting to 4738')
if (!process.env.CORS_ORIGIN) throw new Error('CORS_ORIGIN is not defined.') if (!process.env.CORS_ORIGIN) throw new Error('CORS_ORIGIN is not defined.')
if (!process.env.BASE_URL) throw new Error('BASE_URL is not defined.') if (!process.env.BASE_URL) throw new Error('BASE_URL is not defined.')
@ -32,7 +32,7 @@ export const DEFAULT_RELAYS = process.env.DEFAULT_RELAYS.split(',').map(normaliz
export const INDEXER_RELAYS = process.env.INDEXER_RELAYS.split(',').map(normalizeRelayUrl) export const INDEXER_RELAYS = process.env.INDEXER_RELAYS.split(',').map(normalizeRelayUrl)
export const SEARCH_RELAYS = process.env.SEARCH_RELAYS.split(',').map(normalizeRelayUrl) export const SEARCH_RELAYS = process.env.SEARCH_RELAYS.split(',').map(normalizeRelayUrl)
export const CORS_ORIGIN = process.env.CORS_ORIGIN export const CORS_ORIGIN = process.env.CORS_ORIGIN
export const PORT = process.env.PORT export const PORT = process.env.PORT || '4738'
export const SMTP_HOST = process.env.SMTP_HOST export const SMTP_HOST = process.env.SMTP_HOST
export const SMTP_PORT = process.env.SMTP_PORT export const SMTP_PORT = process.env.SMTP_PORT
export const SMTP_USER = process.env.SMTP_USER export const SMTP_USER = process.env.SMTP_USER