From 02dd5944c8ffe14eece6cc3b4baa1be4480eb865 Mon Sep 17 00:00:00 2001 From: Agent Date: Mon, 14 Sep 2026 13:14:05 -0400 Subject: [PATCH] align PORT default: make optional with 4738, update README MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 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. --- README.md | 2 +- src/env.ts | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 51c9fa7..0dbb9f0 100644 --- a/README.md +++ b/README.md @@ -42,7 +42,7 @@ Flotilla ──HTTP──▶ Mailship (PUT /subscription/email) | `DEFAULT_RELAYS` | ✓ | Comma-separated list of default relays | | `INDEXER_RELAYS` | ✓ | Comma-separated list of indexer relays | | `SEARCH_RELAYS` | ✓ | Comma-separated list of search relays | -| `PORT` | | Port to run on (default: 3000) | +| `PORT` | | Port to run on (default: 4738) | ## API diff --git a/src/env.ts b/src/env.ts index a2a5e6b..648795a 100644 --- a/src/env.ts +++ b/src/env.ts @@ -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.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.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.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 SEARCH_RELAYS = process.env.SEARCH_RELAYS.split(',').map(normalizeRelayUrl) 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_PORT = process.env.SMTP_PORT export const SMTP_USER = process.env.SMTP_USER